summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAhmed Bougacha <ahmed.bougacha@gmail.com>2013-08-21 07:28:02 +0000
committerAhmed Bougacha <ahmed.bougacha@gmail.com>2013-08-21 07:28:02 +0000
commit07e8f8f64308239ba9f707c869e0f0e53071a992 (patch)
treebfb79ad06a144551fdf818ef6f0bfebd3ca50db3 /include
parentf9e2348e948451d30e4e0593e0beb3bcc31da8da (diff)
downloadllvm-07e8f8f64308239ba9f707c869e0f0e53071a992.tar.gz
llvm-07e8f8f64308239ba9f707c869e0f0e53071a992.tar.bz2
llvm-07e8f8f64308239ba9f707c869e0f0e53071a992.tar.xz
MC CFG: Add entrypoint address to MCModule.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188877 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/MC/MCModule.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/llvm/MC/MCModule.h b/include/llvm/MC/MCModule.h
index 6d493628b7..a145653af7 100644
--- a/include/llvm/MC/MCModule.h
+++ b/include/llvm/MC/MCModule.h
@@ -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.
@@ -101,6 +104,9 @@ public:
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; }
};
}