[llvm] r188877 - MC CFG: Add entrypoint address to MCModule.
David Blaikie
dblaikie at gmail.com
Wed Aug 21 10:19:51 PDT 2013
On Wed, Aug 21, 2013 at 12:28 AM, Ahmed Bougacha
<ahmed.bougacha at gmail.com> wrote:
> Author: ab
> Date: Wed Aug 21 02:28:02 2013
> New Revision: 188877
>
> URL: http://llvm.org/viewvc/llvm-project?rev=188877&view=rev
> Log:
> MC CFG: Add entrypoint address to MCModule.
Again, dead-code/no visible use case, makes it hard to understand the
motivation/reason for existence (both now & in the future when someone
goes to look at/understand this code).
>
> Modified:
> llvm/trunk/include/llvm/MC/MCModule.h
>
> Modified: llvm/trunk/include/llvm/MC/MCModule.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCModule.h?rev=188877&r1=188876&r2=188877&view=diff
> ==============================================================================
> --- llvm/trunk/include/llvm/MC/MCModule.h (original)
> +++ llvm/trunk/include/llvm/MC/MCModule.h Wed Aug 21 02:28:02 2013
> @@ -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; }
> };
>
> }
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list