[llvm-commits] [dragonegg] r92729 - /dragonegg/trunk/llvm-debug.cpp
Duncan Sands
baldrick at free.fr
Tue Jan 5 06:17:17 PST 2010
Author: baldrick
Date: Tue Jan 5 08:17:17 2010
New Revision: 92729
URL: http://llvm.org/viewvc/llvm-project?rev=92729&view=rev
Log:
Minimize the differences with llvm-gcc's version of this file.
No functionality change.
Modified:
dragonegg/trunk/llvm-debug.cpp
Modified: dragonegg/trunk/llvm-debug.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/llvm-debug.cpp?rev=92729&r1=92728&r2=92729&view=diff
==============================================================================
--- dragonegg/trunk/llvm-debug.cpp (original)
+++ dragonegg/trunk/llvm-debug.cpp Tue Jan 5 08:17:17 2010
@@ -249,6 +249,8 @@
expanded_location Loc = GetNodeLocation(FnDecl, false);
StringRef LinkageName = getLinkageName(FnDecl);
+ unsigned lineno = CurLineNo;
+
unsigned Virtuality = 0;
unsigned VIndex = 0;
DIType ContainingType;
@@ -271,7 +273,7 @@
(UseModuleContext ? FnName : StringRef()),
(UseModuleContext ? FnName : StringRef()),
LinkageName,
- getOrCreateCompileUnit(Loc.file), CurLineNo,
+ getOrCreateCompileUnit(Loc.file), lineno,
FNType,
Fn->hasInternalLinkage(),
true /*definition*/,
@@ -508,6 +510,7 @@
unsigned Tag = TREE_CODE(type) == POINTER_TYPE ?
DW_TAG_pointer_type :
DW_TAG_reference_type;
+ unsigned Flags = 0;
expanded_location Loc = GetNodeLocation(type);
// Check if this pointer type has a name.
@@ -536,7 +539,7 @@
NodeSizeInBits(type),
NodeAlignInBits(type),
0 /*offset */,
- 0,
+ Flags,
FromTy);
return PTy;
}
@@ -575,9 +578,9 @@
uint64_t Low = 0;
uint64_t Hi = 0;
if (MinValue && isInt64(MinValue, 0))
- Low = getINTEGER_CSTVal(MinValue);
+ Low = getINTEGER_CSTVal(MinValue);
if (MaxValue && isInt64(MaxValue, 0))
- Hi = getINTEGER_CSTVal(MaxValue);
+ Hi = getINTEGER_CSTVal(MaxValue);
Subscripts.push_back(DebugFactory.GetOrCreateSubrange(Low, Hi));
}
EltTy = TREE_TYPE(atype);
@@ -858,8 +861,8 @@
if (tree TyDef = TYPE_NAME(type)) {
std::map<tree_node *, WeakVH >::iterator I = TypeCache.find(TyDef);
if (I != TypeCache.end())
- if (Value *M = I->second)
- return DIType(cast<MDNode>(M));
+ if (Value *M = I->second)
+ return DIType(cast<MDNode>(M));
if (TREE_CODE(TyDef) == TYPE_DECL && DECL_ORIGINAL_TYPE(TyDef)) {
expanded_location TypeDefLoc = GetNodeLocation(TyDef);
Ty = DebugFactory.CreateDerivedType(DW_TAG_typedef,
@@ -1053,16 +1056,18 @@
else
LangTag = DW_LANG_C89;
+ StringRef Flags;
+
// flag_objc_abi represents Objective-C runtime version number. It is zero
// for all other language.
unsigned ObjcRunTimeVer = 0;
// if (flag_objc_abi != 0 && flag_objc_abi != -1)
// ObjcRunTimeVer = flag_objc_abi;
DICompileUnit NewCU = DebugFactory.CreateCompileUnit(LangTag, FileName.c_str(),
- Directory.c_str(),
- version_string, isMain,
- optimize, StringRef(),
- ObjcRunTimeVer);
+ Directory.c_str(),
+ version_string, isMain,
+ optimize, Flags,
+ ObjcRunTimeVer);
CUCache[FullPath] = WeakVH(NewCU.getNode());
return NewCU;
}
More information about the llvm-commits
mailing list