[llvm-commits] [llvm-gcc-4.2] r48644 - in /llvm-gcc-4.2/trunk/gcc: llvm-backend.cpp llvm-convert.cpp
Duncan Sands
baldrick at free.fr
Fri Mar 21 03:58:56 PDT 2008
Author: baldrick
Date: Fri Mar 21 05:58:54 2008
New Revision: 48644
URL: http://llvm.org/viewvc/llvm-project?rev=48644&view=rev
Log:
Revert this part of the previous patch: the
new StructType::get method needs at least one
type argument (used to disambiguate from the
other StructType::get method).
Modified:
llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp
llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
Modified: llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp?rev=48644&r1=48643&r2=48644&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp Fri Mar 21 05:58:54 2008
@@ -1215,9 +1215,9 @@
// If we have "extern void foo", make the global have type {} instead of
// type void.
- if (Ty == Type::VoidTy)
- Ty = StructType::get(NULL);
-
+ if (Ty == Type::VoidTy)
+ Ty = StructType::get(std::vector<const Type*>(), false);
+
if (Name[0] == 0) { // Global has no name.
GV = new GlobalVariable(Ty, false, GlobalValue::ExternalLinkage, 0,
"", TheModule);
Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp?rev=48644&r1=48643&r2=48644&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Fri Mar 21 05:58:54 2008
@@ -5172,7 +5172,8 @@
const Type *Ty = ConvertType(TREE_TYPE(exp));
// If we have "extern void foo", make the global have type {} instead of
// type void.
- if (Ty == Type::VoidTy) Ty = StructType::get(NULL);
+ if (Ty == Type::VoidTy) Ty = StructType::get(std::vector<const Type*>(),
+ false);
const PointerType *PTy = PointerType::getUnqual(Ty);
return BitCastToType(Decl, PTy);
}
More information about the llvm-commits
mailing list