Skip to content

Commit

Permalink
MC CFG: Add entrypoint address to MCModule.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188877 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
ahmedbougacha committed Aug 21, 2013
1 parent f9e2348 commit 07e8f8f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion include/llvm/MC/MCModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,17 @@ class MCModule {
FunctionListTy Functions;
/// @}

/// The address of the entrypoint function.
uint64_t Entrypoint;

MCModule (const MCModule &) LLVM_DELETED_FUNCTION;
MCModule& operator=(const MCModule &) LLVM_DELETED_FUNCTION;

// MCObjectDisassembler creates MCModules.
friend class MCObjectDisassembler;
MCModule() : Atoms() { }

public:
MCModule() : Entrypoint(0) { }
~MCModule();

/// \name Create a new MCAtom covering the specified offset range.
Expand Down Expand Up @@ -101,6 +104,9 @@ class MCModule {
const_func_iterator func_end() const { return Functions.end(); }
func_iterator func_end() { return Functions.end(); }
/// @}

/// \brief Get the address of the entrypoint function, or 0 if there is none.
uint64_t getEntrypoint() const { return Entrypoint; }
};

}
Expand Down

0 comments on commit 07e8f8f

Please sign in to comment.