[llvm-commits] [llvm-gcc-4.2] r64988 - in /llvm-gcc-4.2/branches/Apple/Dib/gcc: llvm-convert.cpp llvm-debug.cpp llvm-internal.h
Bill Wendling
isanbard at gmail.com
Wed Feb 18 16:14:36 PST 2009
Author: void
Date: Wed Feb 18 18:14:36 2009
New Revision: 64988
URL: http://llvm.org/viewvc/llvm-project?rev=64988&view=rev
Log:
--- Merging r64981 into '.':
U gcc/llvm-convert.cpp
U gcc/llvm-internal.h
U gcc/llvm-debug.cpp
llvm-debug should not bother to check for constant folding overflow.
Modified:
llvm-gcc-4.2/branches/Apple/Dib/gcc/llvm-convert.cpp
llvm-gcc-4.2/branches/Apple/Dib/gcc/llvm-debug.cpp
llvm-gcc-4.2/branches/Apple/Dib/gcc/llvm-internal.h
Modified: llvm-gcc-4.2/branches/Apple/Dib/gcc/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Dib/gcc/llvm-convert.cpp?rev=64988&r1=64987&r2=64988&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Dib/gcc/llvm-convert.cpp (original)
+++ llvm-gcc-4.2/branches/Apple/Dib/gcc/llvm-convert.cpp Wed Feb 18 18:14:36 2009
@@ -282,7 +282,7 @@
/// getINTEGER_CSTVal - Return the specified INTEGER_CST value as a uint64_t.
///
-static uint64_t getINTEGER_CSTVal(tree exp) {
+uint64_t getINTEGER_CSTVal(tree exp) {
unsigned HOST_WIDE_INT HI = (unsigned HOST_WIDE_INT)TREE_INT_CST_HIGH(exp);
unsigned HOST_WIDE_INT LO = (unsigned HOST_WIDE_INT)TREE_INT_CST_LOW(exp);
if (HOST_BITS_PER_WIDE_INT == 64) {
Modified: llvm-gcc-4.2/branches/Apple/Dib/gcc/llvm-debug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Dib/gcc/llvm-debug.cpp?rev=64988&r1=64987&r2=64988&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Dib/gcc/llvm-debug.cpp (original)
+++ llvm-gcc-4.2/branches/Apple/Dib/gcc/llvm-debug.cpp Wed Feb 18 18:14:36 2009
@@ -88,14 +88,14 @@
if (TYPE_SIZE(Node) == NULL_TREE)
return 0;
else if (isInt64(TYPE_SIZE(Node), 1))
- return getInt64(TYPE_SIZE(Node), 1);
+ return getINTEGER_CSTVal(TYPE_SIZE(Node));
else
return TYPE_ALIGN(Node);
} else if (DECL_P(Node)) {
if (DECL_SIZE(Node) == NULL_TREE)
return 0;
else if (isInt64(DECL_SIZE(Node), 1))
- return getInt64(DECL_SIZE(Node), 1);
+ return getINTEGER_CSTVal(DECL_SIZE(Node));
else
return DECL_ALIGN(Node);
}
@@ -475,8 +475,8 @@
tree MaxValue = TYPE_MAX_VALUE(Domain);
if (MinValue && MaxValue &&
isInt64(MinValue, 0) && isInt64(MaxValue, 0)) {
- uint64_t Low = getInt64(MinValue, 0);
- uint64_t Hi = getInt64(MaxValue, 0);
+ uint64_t Low = getINTEGER_CSTVal(MinValue);
+ uint64_t Hi = getINTEGER_CSTVal(MaxValue);
Subscripts.push_back(DebugFactory.GetOrCreateSubrange(Low, Hi));
}
}
@@ -503,7 +503,7 @@
if (TYPE_SIZE(type)) {
for (tree Link = TYPE_VALUES(type); Link; Link = TREE_CHAIN(Link)) {
tree EnumValue = TREE_VALUE(Link);
- int64_t Value = getInt64(EnumValue, tree_int_cst_sgn(EnumValue) > 0);
+ int64_t Value = getINTEGER_CSTVal(EnumValue);
const char *EnumName = IDENTIFIER_POINTER(TREE_PURPOSE(Link));
Elements.push_back(DebugFactory.CreateEnumerator(EnumName, Value));
}
@@ -597,7 +597,7 @@
findRegion(type),"",
getOrCreateCompileUnit(Loc.file),
0,0,0,
- getInt64(BINFO_OFFSET(BInfo), 0),
+ getINTEGER_CSTVal(BINFO_OFFSET(BInfo)),
0, BaseClass);
EltTys.push_back(DTy);
}
Modified: llvm-gcc-4.2/branches/Apple/Dib/gcc/llvm-internal.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Dib/gcc/llvm-internal.h?rev=64988&r1=64987&r2=64988&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Dib/gcc/llvm-internal.h (original)
+++ llvm-gcc-4.2/branches/Apple/Dib/gcc/llvm-internal.h Wed Feb 18 18:14:36 2009
@@ -197,6 +197,10 @@
return TheTypeConverter->GetFieldIndex(field_decl);
}
+/// getINTEGER_CSTVal - Return the specified INTEGER_CST value as a uint64_t.
+///
+uint64_t getINTEGER_CSTVal(tree_node *exp);
+
/// isInt64 - Return true if t is an INTEGER_CST that fits in a 64 bit integer.
/// If Unsigned is false, returns whether it fits in a int64_t. If Unsigned is
/// true, returns whether the value is non-negative and fits in a uint64_t.
More information about the llvm-commits
mailing list