[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
Chris Lattner
lattner at cs.uiuc.edu
Tue Dec 13 09:40:45 PST 2005
Changes in directory llvm/lib/CodeGen/SelectionDAG:
SelectionDAGISel.cpp updated: 1.115 -> 1.116
---
Log message:
Don't lump the filename and working dir together
---
Diffs of the changes: (+16 -15)
SelectionDAGISel.cpp | 31 ++++++++++++++++---------------
1 files changed, 16 insertions(+), 15 deletions(-)
Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.115 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.116
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.115 Mon Dec 12 16:51:16 2005
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Tue Dec 13 11:40:33 2005
@@ -895,23 +895,13 @@
getValue(I.getOperand(2))));
return 0;
- case Intrinsic::dbg_stoppoint:
- {
+ case Intrinsic::dbg_stoppoint: {
if (TLI.getTargetMachine().getIntrinsicLowering().EmitDebugFunctions())
return "llvm_debugger_stop";
std::string fname = "<unknown>";
std::vector<SDOperand> Ops;
- // Pull the filename out of the the compilation unit.
- const GlobalVariable *cunit = dyn_cast<GlobalVariable>(I.getOperand(4));
- if (cunit && cunit->hasInitializer()) {
- ConstantStruct *CS = dyn_cast<ConstantStruct>(cunit->getInitializer());
- if (CS->getNumOperands() > 0) {
- std::string dirname = getStringValue(CS->getOperand(4));
- fname = dirname + "/" + getStringValue(CS->getOperand(3));
- }
- }
// Input Chain
Ops.push_back(getRoot());
@@ -921,10 +911,21 @@
// column
Ops.push_back(getValue(I.getOperand(3)));
- // filename
- Ops.push_back(DAG.getString(fname));
- Ops.push_back(DAG.getString(""));
- DAG.setRoot(DAG.getNode(ISD::LOCATION, MVT::Other, Ops));
+ // filename/working dir
+ // Pull the filename out of the the compilation unit.
+ const GlobalVariable *cunit = dyn_cast<GlobalVariable>(I.getOperand(4));
+ if (cunit && cunit->hasInitializer()) {
+ if (ConstantStruct *CS =
+ dyn_cast<ConstantStruct>(cunit->getInitializer())) {
+ if (CS->getNumOperands() > 0) {
+ Ops.push_back(DAG.getString(getStringValue(CS->getOperand(4))));
+ Ops.push_back(DAG.getString(getStringValue(CS->getOperand(3))));
+ }
+ }
+ }
+
+ if (Ops.size() == 5) // Found filename/workingdir.
+ DAG.setRoot(DAG.getNode(ISD::LOCATION, MVT::Other, Ops));
setValue(&I, DAG.getNode(ISD::UNDEF, TLI.getValueType(I.getType())));
return 0;
}
More information about the llvm-commits
mailing list