[llvm-commits] CVS: llvm/lib/Target/CBackend/Writer.cpp

Jim Laskey jlaskey at apple.com
Thu Mar 23 10:08:41 PST 2006



Changes in directory llvm/lib/Target/CBackend:

Writer.cpp updated: 1.258 -> 1.259
---
Log message:

Modify how CBE handles #lines.


---
Diffs of the changes:  (+5 -9)

 Writer.cpp |   14 +++++---------
 1 files changed, 5 insertions(+), 9 deletions(-)


Index: llvm/lib/Target/CBackend/Writer.cpp
diff -u llvm/lib/Target/CBackend/Writer.cpp:1.258 llvm/lib/Target/CBackend/Writer.cpp:1.259
--- llvm/lib/Target/CBackend/Writer.cpp:1.258	Wed Mar 22 23:43:15 2006
+++ llvm/lib/Target/CBackend/Writer.cpp	Thu Mar 23 12:08:29 2006
@@ -21,6 +21,7 @@
 #include "llvm/PassManager.h"
 #include "llvm/SymbolTable.h"
 #include "llvm/Intrinsics.h"
+#include "llvm/IntrinsicInst.h"
 #include "llvm/Analysis/ConstantsScanner.h"
 #include "llvm/Analysis/FindUsedTypes.h"
 #include "llvm/Analysis/LoopInfo.h"
@@ -1715,17 +1716,12 @@
       case Intrinsic::dbg_stoppoint: {
         // If we use writeOperand directly we get a "u" suffix which is rejected
         // by gcc.
-        ConstantUInt *SI = cast<ConstantUInt>(I.getOperand(1));
-        GlobalVariable *GV = cast<GlobalVariable>(I.getOperand(3));
-        ConstantStruct *CS = cast<ConstantStruct>(GV->getInitializer());
-        std::string FileName = CS->getOperand(4)->getStringValue();
-        std::string Directory = CS->getOperand(5)->getStringValue();
+        DbgStopPointInst &SPI = cast<DbgStopPointInst>(I);
 
         Out << "\n#line "
-            << SI->getValue()
-            << " \"" << Directory << FileName << "\"\n";
-        // Need to set result.
-        Out << "0";
+            << SPI.getLine()
+            << " \"" << SPI.getDirectory()
+            << SPI.getFileName() << "\"\n";
         return;
       }
       }






More information about the llvm-commits mailing list