Merge pull request #1025 from aguskov/master

Fix typos in the previous LLVM debug info commit
This commit is contained in:
Dmitry Babokin
2015-04-24 18:17:12 +03:00
2 changed files with 9 additions and 2 deletions

View File

@@ -1667,7 +1667,13 @@ FunctionEmitContext::AddDebugPos(llvm::Value *value, const SourcePos *pos,
// the standard library or the like; don't add debug positions
// for those functions
inst->setDebugLoc(llvm::DebugLoc::get(p.first_line, p.first_column,
scope ? scope : GetDIScope()));
scope ?
#if defined(LLVM_3_2) || defined(LLVM_3_3) || defined(LLVM_3_4) || defined(LLVM_3_5) || defined(LLVM_3_6)
*scope
#else // LLVM 3.7++
scope
#endif
: GetDIScope()));
}
}

View File

@@ -1276,10 +1276,11 @@ llvm::MDType *PointerType::GetDIType(llvm::MDScope *scope) const {
case Variability::Varying: {
// emit them as an array of pointers
#if defined(LLVM_3_2) || defined(LLVM_3_3) || defined(LLVM_3_4) || defined(LLVM_3_5) || defined(LLVM_3_6)
llvm::DIType eltType =
#else //LLVM 3.7++
llvm::MDDerivedType *eltType =
m->diBuilder->createPointerType(diTargetType, bitsSize, ptrAlignBits);
#endif
m->diBuilder->createPointerType(diTargetType, bitsSize, ptrAlignBits);
return lCreateDIArray(eltType, g->target->getVectorWidth());
}
case Variability::SOA: {