radeon/llvm: Make sure to use the Text section in the AsmPrinter
authorTom Stellard <thomas.stellard@amd.com>
Thu, 23 Aug 2012 19:15:39 +0000 (19:15 +0000)
committerTom Stellard <thomas.stellard@amd.com>
Thu, 23 Aug 2012 21:54:31 +0000 (21:54 +0000)
src/gallium/drivers/radeon/AMDGPUAsmPrinter.cpp

index 085649d..e751ea5 100644 (file)
@@ -4,6 +4,7 @@
 #include "SIMachineFunctionInfo.h"
 #include "SIRegisterInfo.h"
 #include "llvm/MC/MCStreamer.h"
+#include "llvm/Target/TargetLoweringObjectFile.h"
 #include "llvm/Support/TargetRegistry.h"
 
 using namespace llvm;
@@ -29,6 +30,7 @@ bool AMDGPUAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
   if (STM.device()->getGeneration() > AMDGPUDeviceInfo::HD6XXX) {
     EmitProgramInfo(MF);
   }
+  OutStreamer.SwitchSection(getObjFileLowering().getTextSection());
   EmitFunctionBody();
   return false;
 }