mirror of
				https://github.com/c64scene-ar/llvm-6502.git
				synced 2025-10-31 08:16:47 +00:00 
			
		
		
		
	Modify the code that emits the module flags to use the new module flags accessor
method. This allows the target lowering code to not have to deal with MDNodes. Also, avoid leaking memory like a sieve by not creating a global variable for the image info section, but just emitting the code directly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150624 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
		| @@ -15,9 +15,9 @@ | ||||
| #ifndef LLVM_CODEGEN_TARGETLOWERINGOBJECTFILEIMPL_H | ||||
| #define LLVM_CODEGEN_TARGETLOWERINGOBJECTFILEIMPL_H | ||||
|  | ||||
| #include "llvm/ADT/StringRef.h" | ||||
| #include "llvm/MC/SectionKind.h" | ||||
| #include "llvm/Target/TargetLoweringObjectFile.h" | ||||
| #include "llvm/ADT/StringRef.h" | ||||
|  | ||||
| namespace llvm { | ||||
|   class MachineModuleInfo; | ||||
| @@ -80,7 +80,8 @@ public: | ||||
|  | ||||
|   /// emitModuleFlags - Emit the module flags that specify the garbage | ||||
|   /// collection information. | ||||
|   virtual void emitModuleFlags(MCStreamer &Streamer, NamedMDNode *ModFlags, | ||||
|   virtual void emitModuleFlags(MCStreamer &Streamer, | ||||
|                                ArrayRef<Module::ModuleFlagEntry> ModuleFlags, | ||||
|                                Mangler *Mang, const TargetMachine &TM) const; | ||||
|  | ||||
|   virtual const MCSection * | ||||
|   | ||||
| @@ -15,9 +15,11 @@ | ||||
| #ifndef LLVM_TARGET_TARGETLOWERINGOBJECTFILE_H | ||||
| #define LLVM_TARGET_TARGETLOWERINGOBJECTFILE_H | ||||
|  | ||||
| #include "llvm/ADT/StringRef.h" | ||||
| #include "llvm/Module.h" | ||||
| #include "llvm/MC/MCObjectFileInfo.h" | ||||
| #include "llvm/MC/SectionKind.h" | ||||
| #include "llvm/ADT/ArrayRef.h" | ||||
| #include "llvm/ADT/StringRef.h" | ||||
|  | ||||
| namespace llvm { | ||||
|   class MachineModuleInfo; | ||||
| @@ -56,8 +58,9 @@ public: | ||||
|                                     const MCSymbol *Sym) const; | ||||
|  | ||||
|   /// emitModuleFlags - Emit the module flags that the platform cares about. | ||||
|   virtual void emitModuleFlags(MCStreamer &, NamedMDNode *, Mangler *, | ||||
|                                const TargetMachine &) const { | ||||
|   virtual void emitModuleFlags(MCStreamer &, | ||||
|                                ArrayRef<Module::ModuleFlagEntry>, | ||||
|                                Mangler *, const TargetMachine &) const { | ||||
|   } | ||||
|  | ||||
|   /// shouldEmitUsedDirectiveFor - This hook allows targets to selectively | ||||
|   | ||||
		Reference in New Issue
	
	Block a user