From 0d3193ef3ce7377eeaa1d38ca08f8a62ebcd5f63 Mon Sep 17 00:00:00 2001 From: Bruno Cardoso Lopes Date: Mon, 22 Jun 2009 19:16:16 +0000 Subject: Add more methods to gather target specific elf stuff Support for .text relocations, implementing TargetELFWriter overloaded methods for x86/x86_64. Use a map to track global values to their symbol table indexes Code cleanup and small fixes git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73894 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/CodeGen/BinaryObject.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/llvm/CodeGen') diff --git a/include/llvm/CodeGen/BinaryObject.h b/include/llvm/CodeGen/BinaryObject.h index 0780cd6ab4..4b66fe8567 100644 --- a/include/llvm/CodeGen/BinaryObject.h +++ b/include/llvm/CodeGen/BinaryObject.h @@ -61,6 +61,11 @@ public: return Relocations; } + /// hasRelocations - Return true if 'Relocations' is not empty + bool hasRelocations() const { + return !Relocations.empty(); + } + /// emitByte - This callback is invoked when a byte needs to be /// written to the data stream. inline void emitByte(uint8_t B) { @@ -317,6 +322,7 @@ public: void addRelocation(const MachineRelocation& relocation) { Relocations.push_back(relocation); } + }; } // end namespace llvm -- cgit v1.2.3-70-g09d2