From 36063bae79418e9be1adef1cc85c88967b26156e Mon Sep 17 00:00:00 2001 From: Matt Pharr Date: Sun, 26 Jun 2011 08:00:00 -0700 Subject: [PATCH] Update call to llvm::DIBuilder::createMemberType to fix building with LLVM dev TOT --- type.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/type.cpp b/type.cpp index e22bcb40..0cbdba38 100644 --- a/type.cpp +++ b/type.cpp @@ -1161,10 +1161,17 @@ StructType::GetDIType(llvm::DIDescriptor scope) const { // FIXME: we should pass this actual file/line number for the // member, not the position of the struct declaration +#ifdef LLVM_2_9 llvm::DIType fieldType = m->diBuilder->createMemberType(elementNames[i], diFile, pos.first_line, eltSize, eltAlign, currentSize, 0, eltType); +#else + llvm::DIType fieldType = + m->diBuilder->createMemberType(scope, elementNames[i], diFile, + pos.first_line, eltSize, eltAlign, + currentSize, 0, eltType); +#endif // LLVM_2_9 elementLLVMTypes.push_back(fieldType); currentSize += eltSize;