diff options
Diffstat (limited to 'community/llvm')
-rw-r--r-- | community/llvm/PKGBUILD | 190 | ||||
-rw-r--r-- | community/llvm/clang-2.8-alignOf.patch | 199 | ||||
-rw-r--r-- | community/llvm/clang-2.8-cindexer-clang-path.patch | 13 | ||||
-rw-r--r-- | community/llvm/clang-plugin-loader-registry.patch | 11 | ||||
-rw-r--r-- | community/llvm/cpp-headers.patch | 17 | ||||
-rw-r--r-- | community/llvm/llvm-2.8-alignOf.patch | 59 |
6 files changed, 489 insertions, 0 deletions
diff --git a/community/llvm/PKGBUILD b/community/llvm/PKGBUILD new file mode 100644 index 000000000..7a80e112b --- /dev/null +++ b/community/llvm/PKGBUILD @@ -0,0 +1,190 @@ +# $Id: PKGBUILD 39503 2011-02-11 00:00:17Z foutrelis $ +# Maintainer: Evangelos Foutras <foutrelis@gmail.com> +# Contributor: Sebastian Nowicki <sebnow@gmail.com> +# Contributor: Devin Cofer <ranguvar{AT]archlinux[DOT}us> +# Contributor: Tobias Kieslich <tobias@justdreams.de> +# Contributor: Geoffroy Carrier <geoffroy.carrier@aur.archlinux.org> +# Contributor: Tomas Lindquist Olsen <tomas@famolsen.dk> +# Contributor: Roberto Alsina <ralsina@kde.org> +# Contributor: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> + +pkgname=('llvm' 'llvm-ocaml' 'clang' 'clang-analyzer') +pkgver=2.8 +pkgrel=5 +arch=('i686' 'x86_64') +url="http://llvm.org/" +license=('custom:University of Illinois/NCSA Open Source License') +makedepends=('gcc-libs' 'libffi' 'python2' 'ocaml') +source=(http://llvm.org/releases/$pkgver/$pkgname-$pkgver.tgz + http://llvm.org/releases/$pkgver/clang-$pkgver.tgz + cpp-headers.patch + clang-plugin-loader-registry.patch + clang-2.8-cindexer-clang-path.patch + llvm-2.8-alignOf.patch + clang-2.8-alignOf.patch) +md5sums=('220d361b4d17051ff4bb21c64abe05ba' + '10e14c901fc3728eecbd5b829e011b59' + 'a5cd48e42dbab68d4c0169802c8ae55b' + '02c23b4aaca3445b8bf39fddb2f9906e' + '338d254d6745568ebdcbe4e20b0057d5' + 'd923655d211191d77c4437b9c1bfa851' + '742a1a13cfdc1cb0a76b8bc3b19b190e') + +build() { + cd "$srcdir/$pkgname-$pkgver" + + # At the present, clang must reside inside the LLVM source code tree to build + # See http://llvm.org/bugs/show_bug.cgi?id=4840 + rm -rf tools/clang + cp -r "$srcdir/clang-$pkgver" tools/clang + + # Fix symbolic links from OCaml bindings to LLVM libraries + sed -i 's:\$(PROJ_libdir):/usr/lib/llvm:' bindings/ocaml/Makefile.ocaml + + # Fix installation directories, ./configure doesn't seem to set them right + sed -i -e 's:\$(PROJ_prefix)/etc/llvm:/etc/llvm:' \ + -e 's:\$(PROJ_prefix)/lib:$(PROJ_prefix)/lib/llvm:' \ + -e 's:\$(PROJ_prefix)/docs/llvm:$(PROJ_prefix)/share/doc/llvm:' \ + Makefile.config.in + + # Fix insecure rpath (http://bugs.archlinux.org/task/14017) + sed -i 's:$(RPATH) -Wl,$(\(ToolDir\|LibDir\|ExmplDir\))::g' Makefile.rules + + # Update hardcoded path to C++ header files + patch -d tools/clang -Np1 -i "$srcdir/cpp-headers.patch" + + # Get the correct list of symbols to export + # See http://lists.cs.uiuc.edu/pipermail/cfe-dev/2010-April/008559.html + patch -Np1 -i "$srcdir/clang-plugin-loader-registry.patch" + + # Fix C++0x name clashes (https://bugs.archlinux.org/task/22296) + patch -Np0 -i "$srcdir/llvm-2.8-alignOf.patch" + patch -d tools/clang -Np0 -i "$srcdir/clang-2.8-alignOf.patch" + + # Fix clang path in CIndexer.cpp (https://bugs.archlinux.org/task/22799) + patch -d tools/clang -Np1 -i "$srcdir/clang-2.8-cindexer-clang-path.patch" + + # Apply strip option to configure + _optimize_flag="--enable-optimize" + [ "$(check_option strip)" = "n" ] && _optimize_flag="--disable-optimize" + + # Include location of libffi headers in CPPFLAGS + export CPPFLAGS="$CPPFLAGS $(pkg-config --cflags libffi)" + + # Well, this is supposed to be the final release + sed -i 's/2.8rc/2.8/g' configure + + ./configure --prefix=/usr --libdir=/usr/lib/llvm --sysconfdir=/etc \ + --enable-shared --enable-libffi \ + --enable-bindings=ocaml --enable-targets=all \ + --disable-expensive-checks --disable-debug-runtime \ + --disable-assertions --with-binutils-include=/usr/include \ + $_optimize_flag + make +} + +package_llvm() { + pkgdesc="Low Level Virtual Machine" + depends=('perl' 'libffi') + + cd "$srcdir/$pkgname-$pkgver" + + # We move the clang directory out of the tree so it won't get installed and + # then we bring it back in for the clang package + mv tools/clang "$srcdir" + # -j1 is due to race conditions during the installation of the OCaml bindings + make -j1 DESTDIR="$pkgdir" install + mv "$srcdir/clang" tools + + # OCaml bindings go to a separate package + rm -rf "$srcdir"/{ocaml,ocamldoc} + mv "$pkgdir"/usr/{lib/ocaml,share/doc/llvm/ocamldoc} "$srcdir" + + # Remove duplicate files installed by the OCaml bindings + rm "$pkgdir"/usr/{lib/llvm/libllvm*,share/doc/llvm/ocamldoc.tar.gz} + + # Fix permissions of static libs + chmod -x "$pkgdir"/usr/lib/llvm/*.a + + # Fix libdir in llvm-config (http://bugs.archlinux.org/task/14487) + sed -i 's:\(ABS_RUN_DIR/lib\):\1/llvm:' "$pkgdir/usr/bin/llvm-config" + + # Get rid of example Hello transformation + rm "$pkgdir"/usr/lib/llvm/*LLVMHello.* + + # Symlink the gold plugin where clang expects it + ln -s "llvm/libLLVMgold.so" "$pkgdir/usr/lib/LLVMgold.so" + + # Add ld.so.conf.d entry + install -d "$pkgdir/etc/ld.so.conf.d" + echo /usr/lib/llvm >"$pkgdir/etc/ld.so.conf.d/llvm.conf" + + install -Dm644 LICENSE.TXT "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} + +package_llvm-ocaml() { + pkgdesc="OCaml bindings for LLVM" + depends=("llvm=$pkgver-$pkgrel" 'ocaml') + + cd "$srcdir/llvm-$pkgver" + + install -d "$pkgdir"/{usr/lib,usr/share/doc/llvm} + cp -r "$srcdir/ocaml" "$pkgdir/usr/lib" + cp -r "$srcdir/ocamldoc" "$pkgdir/usr/share/doc/llvm" + + # Remove execute bit from static libraries + chmod -x "$pkgdir"/usr/lib/ocaml/libllvm*.a + + install -Dm644 LICENSE.TXT "$pkgdir/usr/share/licenses/llvm-ocaml/LICENSE" +} + +package_clang() { + pkgdesc="C language family frontend for LLVM" + url="http://clang.llvm.org/" + # It looks like clang still needs GCC to assemble and link object files + # See http://old.nabble.com/%22clang--v%22-shows-a-GCC-call-td28378453.html + depends=("llvm=$pkgver-$pkgrel" 'gcc=4.5.2') + + # Fix installation path for clang docs + sed -i 's:$(PROJ_prefix)/share/doc/llvm:$(PROJ_prefix)/share/doc/clang:' \ + "$srcdir/llvm-$pkgver/Makefile.config" + + cd "$srcdir/llvm-$pkgver/tools/clang" + make DESTDIR="$pkgdir" install + + # Fix permissions of static libs + chmod -x "$pkgdir"/usr/lib/llvm/*.a + + # Revert the path change in case we want to do a repackage later + sed -i 's:$(PROJ_prefix)/share/doc/clang:$(PROJ_prefix)/share/doc/llvm:' \ + "$srcdir/llvm-$pkgver/Makefile.config" + + install -Dm644 LICENSE.TXT "$pkgdir/usr/share/licenses/clang/LICENSE" +} + +package_clang-analyzer() { + pkgdesc="A source code analysis framework" + url="http://clang-analyzer.llvm.org/" + depends=("clang=$pkgver-$pkgrel" 'python2') + + cd "$srcdir/llvm-$pkgver/tools/clang" + + install -d "$pkgdir"/usr/{bin,lib/clang-analyzer} + for tool in scan-{build,view}; do + cp -r tools/$tool "$pkgdir/usr/lib/clang-analyzer" + ln -s /usr/lib/clang-analyzer/$tool/$tool "$pkgdir/usr/bin" + done + + # Use Python 2 + sed -i 's/env python$/\02/' \ + "$pkgdir/usr/lib/clang-analyzer/scan-view/scan-view" \ + "$pkgdir/usr/lib/clang-analyzer/scan-build/set-xcode-analyzer" + + # Compile Python scripts + python2 -m compileall "$pkgdir/usr/lib/clang-analyzer" + python2 -O -m compileall "$pkgdir/usr/lib/clang-analyzer" + + install -Dm644 LICENSE.TXT "$pkgdir/usr/share/licenses/clang-analyzer/LICENSE" +} + +# vim:set ts=2 sw=2 et: diff --git a/community/llvm/clang-2.8-alignOf.patch b/community/llvm/clang-2.8-alignOf.patch new file mode 100644 index 000000000..77aa5219a --- /dev/null +++ b/community/llvm/clang-2.8-alignOf.patch @@ -0,0 +1,199 @@ +Index: lib/Basic/IdentifierTable.cpp +=================================================================== +--- lib/Basic/IdentifierTable.cpp (revision 117774) ++++ lib/Basic/IdentifierTable.cpp (revision 117775) +@@ -390,7 +390,7 @@ + unsigned Size = sizeof(MultiKeywordSelector) + nKeys*sizeof(IdentifierInfo *); + MultiKeywordSelector *SI = + (MultiKeywordSelector*)SelTabImpl.Allocator.Allocate(Size, +- llvm::alignof<MultiKeywordSelector>()); ++ llvm::alignOf<MultiKeywordSelector>()); + new (SI) MultiKeywordSelector(nKeys, IIV); + SelTabImpl.Table.InsertNode(SI, InsertPos); + return Selector(SI); +Index: lib/AST/ExprCXX.cpp +=================================================================== +--- lib/AST/ExprCXX.cpp (revision 117774) ++++ lib/AST/ExprCXX.cpp (revision 117775) +@@ -233,7 +233,7 @@ + if (NumTemplateArgs != 0) + size += ExplicitTemplateArgumentList::sizeFor(NumTemplateArgs); + +- void *Mem = C.Allocate(size, llvm::alignof<UnresolvedLookupExpr>()); ++ void *Mem = C.Allocate(size, llvm::alignOf<UnresolvedLookupExpr>()); + UnresolvedLookupExpr *E = new (Mem) UnresolvedLookupExpr(EmptyShell()); + E->HasExplicitTemplateArgs = NumTemplateArgs != 0; + return E; +@@ -261,7 +261,7 @@ + if (NumResults) { + Results = static_cast<DeclAccessPair *>( + C.Allocate(sizeof(DeclAccessPair) * NumResults, +- llvm::alignof<DeclAccessPair>())); ++ llvm::alignOf<DeclAccessPair>())); + memcpy(Results, &*Begin.getIterator(), + NumResults * sizeof(DeclAccessPair)); + } +@@ -737,7 +737,7 @@ + if (TemplateArgs) + size += ExplicitTemplateArgumentList::sizeFor(*TemplateArgs); + +- void *Mem = C.Allocate(size, llvm::alignof<CXXDependentScopeMemberExpr>()); ++ void *Mem = C.Allocate(size, llvm::alignOf<CXXDependentScopeMemberExpr>()); + return new (Mem) CXXDependentScopeMemberExpr(C, Base, BaseType, + IsArrow, OperatorLoc, + Qualifier, QualifierRange, +@@ -756,7 +756,7 @@ + + std::size_t size = sizeof(CXXDependentScopeMemberExpr) + + ExplicitTemplateArgumentList::sizeFor(NumTemplateArgs); +- void *Mem = C.Allocate(size, llvm::alignof<CXXDependentScopeMemberExpr>()); ++ void *Mem = C.Allocate(size, llvm::alignOf<CXXDependentScopeMemberExpr>()); + CXXDependentScopeMemberExpr *E + = new (Mem) CXXDependentScopeMemberExpr(C, 0, QualType(), + 0, SourceLocation(), 0, +@@ -812,7 +812,7 @@ + if (TemplateArgs) + size += ExplicitTemplateArgumentList::sizeFor(*TemplateArgs); + +- void *Mem = C.Allocate(size, llvm::alignof<UnresolvedMemberExpr>()); ++ void *Mem = C.Allocate(size, llvm::alignOf<UnresolvedMemberExpr>()); + return new (Mem) UnresolvedMemberExpr(C, + Dependent ? C.DependentTy : C.OverloadTy, + Dependent, HasUnresolvedUsing, Base, BaseType, +@@ -826,7 +826,7 @@ + if (NumTemplateArgs != 0) + size += ExplicitTemplateArgumentList::sizeFor(NumTemplateArgs); + +- void *Mem = C.Allocate(size, llvm::alignof<UnresolvedMemberExpr>()); ++ void *Mem = C.Allocate(size, llvm::alignOf<UnresolvedMemberExpr>()); + UnresolvedMemberExpr *E = new (Mem) UnresolvedMemberExpr(EmptyShell()); + E->HasExplicitTemplateArgs = NumTemplateArgs != 0; + return E; +Index: lib/AST/DeclObjC.cpp +=================================================================== +--- lib/AST/DeclObjC.cpp (revision 117774) ++++ lib/AST/DeclObjC.cpp (revision 117775) +@@ -711,7 +711,7 @@ + void ObjCClassDecl::setClassList(ASTContext &C, ObjCInterfaceDecl*const*List, + const SourceLocation *Locs, unsigned Num) { + ForwardDecls = (ObjCClassRef*) C.Allocate(sizeof(ObjCClassRef)*Num, +- llvm::alignof<ObjCClassRef>()); ++ llvm::alignOf<ObjCClassRef>()); + for (unsigned i = 0; i < Num; ++i) + new (&ForwardDecls[i]) ObjCClassRef(List[i], Locs[i]); + +Index: lib/AST/Stmt.cpp +=================================================================== +--- lib/AST/Stmt.cpp (revision 117774) ++++ lib/AST/Stmt.cpp (revision 117775) +@@ -416,7 +416,7 @@ + Stmt *atFinallyStmt) { + unsigned Size = sizeof(ObjCAtTryStmt) + + (1 + NumCatchStmts + (atFinallyStmt != 0)) * sizeof(Stmt *); +- void *Mem = Context.Allocate(Size, llvm::alignof<ObjCAtTryStmt>()); ++ void *Mem = Context.Allocate(Size, llvm::alignOf<ObjCAtTryStmt>()); + return new (Mem) ObjCAtTryStmt(atTryLoc, atTryStmt, CatchStmts, NumCatchStmts, + atFinallyStmt); + } +@@ -426,7 +426,7 @@ + bool HasFinally) { + unsigned Size = sizeof(ObjCAtTryStmt) + + (1 + NumCatchStmts + HasFinally) * sizeof(Stmt *); +- void *Mem = Context.Allocate(Size, llvm::alignof<ObjCAtTryStmt>()); ++ void *Mem = Context.Allocate(Size, llvm::alignOf<ObjCAtTryStmt>()); + return new (Mem) ObjCAtTryStmt(EmptyShell(), NumCatchStmts, HasFinally); + } + +@@ -448,7 +448,7 @@ + std::size_t Size = sizeof(CXXTryStmt); + Size += ((numHandlers + 1) * sizeof(Stmt)); + +- void *Mem = C.Allocate(Size, llvm::alignof<CXXTryStmt>()); ++ void *Mem = C.Allocate(Size, llvm::alignOf<CXXTryStmt>()); + return new (Mem) CXXTryStmt(tryLoc, tryBlock, handlers, numHandlers); + } + +@@ -457,7 +457,7 @@ + std::size_t Size = sizeof(CXXTryStmt); + Size += ((numHandlers + 1) * sizeof(Stmt)); + +- void *Mem = C.Allocate(Size, llvm::alignof<CXXTryStmt>()); ++ void *Mem = C.Allocate(Size, llvm::alignOf<CXXTryStmt>()); + return new (Mem) CXXTryStmt(Empty, numHandlers); + } + +Index: lib/AST/Expr.cpp +=================================================================== +--- lib/AST/Expr.cpp (revision 117774) ++++ lib/AST/Expr.cpp (revision 117775) +@@ -257,7 +257,7 @@ + if (TemplateArgs) + Size += ExplicitTemplateArgumentList::sizeFor(*TemplateArgs); + +- void *Mem = Context.Allocate(Size, llvm::alignof<DeclRefExpr>()); ++ void *Mem = Context.Allocate(Size, llvm::alignOf<DeclRefExpr>()); + return new (Mem) DeclRefExpr(Qualifier, QualifierRange, D, NameInfo, + TemplateArgs, T); + } +@@ -271,7 +271,7 @@ + if (NumTemplateArgs) + Size += ExplicitTemplateArgumentList::sizeFor(NumTemplateArgs); + +- void *Mem = Context.Allocate(Size, llvm::alignof<DeclRefExpr>()); ++ void *Mem = Context.Allocate(Size, llvm::alignOf<DeclRefExpr>()); + return new (Mem) DeclRefExpr(EmptyShell()); + } + +@@ -432,7 +432,7 @@ + // any concatenated string tokens. + void *Mem = C.Allocate(sizeof(StringLiteral)+ + sizeof(SourceLocation)*(NumStrs-1), +- llvm::alignof<StringLiteral>()); ++ llvm::alignOf<StringLiteral>()); + StringLiteral *SL = new (Mem) StringLiteral(Ty); + + // OPTIMIZE: could allocate this appended to the StringLiteral. +@@ -452,7 +452,7 @@ + StringLiteral *StringLiteral::CreateEmpty(ASTContext &C, unsigned NumStrs) { + void *Mem = C.Allocate(sizeof(StringLiteral)+ + sizeof(SourceLocation)*(NumStrs-1), +- llvm::alignof<StringLiteral>()); ++ llvm::alignOf<StringLiteral>()); + StringLiteral *SL = new (Mem) StringLiteral(QualType()); + SL->StrData = 0; + SL->ByteLength = 0; +@@ -714,7 +714,7 @@ + if (targs) + Size += ExplicitTemplateArgumentList::sizeFor(*targs); + +- void *Mem = C.Allocate(Size, llvm::alignof<MemberExpr>()); ++ void *Mem = C.Allocate(Size, llvm::alignOf<MemberExpr>()); + MemberExpr *E = new (Mem) MemberExpr(base, isarrow, memberdecl, nameinfo, ty); + + if (hasQualOrFound) { +Index: lib/AST/DeclCXX.cpp +=================================================================== +--- lib/AST/DeclCXX.cpp (revision 117774) ++++ lib/AST/DeclCXX.cpp (revision 117775) +@@ -1057,7 +1057,7 @@ + unsigned NumIndices) { + void *Mem = Context.Allocate(sizeof(CXXBaseOrMemberInitializer) + + sizeof(VarDecl *) * NumIndices, +- llvm::alignof<CXXBaseOrMemberInitializer>()); ++ llvm::alignOf<CXXBaseOrMemberInitializer>()); + return new (Mem) CXXBaseOrMemberInitializer(Context, Member, MemberLoc, + L, Init, R, Indices, NumIndices); + } +Index: lib/Lex/TokenLexer.cpp +=================================================================== +--- lib/Lex/TokenLexer.cpp (revision 117774) ++++ lib/Lex/TokenLexer.cpp (revision 117775) +@@ -287,7 +287,7 @@ + llvm::BumpPtrAllocator &Alloc = PP.getPreprocessorAllocator(); + Token *Res = + static_cast<Token *>(Alloc.Allocate(sizeof(Token)*ResultToks.size(), +- llvm::alignof<Token>())); ++ llvm::alignOf<Token>())); + if (NumTokens) + memcpy(Res, &ResultToks[0], NumTokens*sizeof(Token)); + Tokens = Res; diff --git a/community/llvm/clang-2.8-cindexer-clang-path.patch b/community/llvm/clang-2.8-cindexer-clang-path.patch new file mode 100644 index 000000000..e283009e9 --- /dev/null +++ b/community/llvm/clang-2.8-cindexer-clang-path.patch @@ -0,0 +1,13 @@ +diff -upr clang-2.8.orig/tools/libclang/CIndexer.cpp clang-2.8/tools/libclang/CIndexer.cpp +--- clang-2.8.orig/tools/libclang/CIndexer.cpp 2010-05-27 23:16:37.000000000 +0300 ++++ clang-2.8/tools/libclang/CIndexer.cpp 2011-02-11 01:14:20.000000000 +0200 +@@ -68,7 +68,8 @@ const llvm::sys::Path& CIndexer::getClan + + // We now have the CIndex directory, locate clang relative to it. + CIndexPath.eraseComponent(); +- CIndexPath.appendComponent(".."); ++ CIndexPath.eraseComponent(); ++ CIndexPath.eraseComponent(); + CIndexPath.appendComponent("bin"); + CIndexPath.appendComponent("clang"); + #endif diff --git a/community/llvm/clang-plugin-loader-registry.patch b/community/llvm/clang-plugin-loader-registry.patch new file mode 100644 index 000000000..f46eb9fce --- /dev/null +++ b/community/llvm/clang-plugin-loader-registry.patch @@ -0,0 +1,11 @@ +diff -upr llvm-2.7.orig/autoconf/ExportMap.map llvm-2.7/autoconf/ExportMap.map +--- llvm-2.7.orig/autoconf/ExportMap.map 2010-02-25 00:33:41.000000000 +0200 ++++ llvm-2.7/autoconf/ExportMap.map 2010-05-10 14:14:22.000000000 +0300 +@@ -2,6 +2,7 @@ + global: main; + __progname; + environ; ++ _ZN4llvm8RegistryIN5clang14FrontendActionENS_14RegistryTraitsIS2_EEE4HeadE; + + local: *; + }; diff --git a/community/llvm/cpp-headers.patch b/community/llvm/cpp-headers.patch new file mode 100644 index 000000000..7e32a3f5b --- /dev/null +++ b/community/llvm/cpp-headers.patch @@ -0,0 +1,17 @@ +diff -uprb clang-2.7.orig/lib/Frontend/InitHeaderSearch.cpp clang-2.7/lib/Frontend/InitHeaderSearch.cpp +--- clang-2.7.orig/lib/Frontend/InitHeaderSearch.cpp 2010-03-06 21:38:10.000000000 +0200 ++++ clang-2.7/lib/Frontend/InitHeaderSearch.cpp 2010-04-30 19:05:24.000000000 +0300 +@@ -539,10 +539,10 @@ void InitHeaderSearch::AddDefaultCPlusPl + "i586-suse-linux", "", "", triple); + AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.4", + "x86_64-suse-linux", "", "", triple); +- // Arch Linux 2008-06-24 +- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.3.1", ++ // Arch Linux 2010-12-17 ++ AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.5.2", + "i686-pc-linux-gnu", "", "", triple); +- AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.3.1", ++ AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.5.2", + "x86_64-unknown-linux-gnu", "", "", triple); + // Gentoo x86 2009.1 stable + AddGnuCPlusPlusIncludePaths( diff --git a/community/llvm/llvm-2.8-alignOf.patch b/community/llvm/llvm-2.8-alignOf.patch new file mode 100644 index 000000000..d48c10cd9 --- /dev/null +++ b/community/llvm/llvm-2.8-alignOf.patch @@ -0,0 +1,59 @@ +Index: include/llvm/ADT/StringMap.h +=================================================================== +--- include/llvm/ADT/StringMap.h (revision 117773) ++++ include/llvm/ADT/StringMap.h (revision 117774) +@@ -167,7 +167,7 @@ + + unsigned AllocSize = static_cast<unsigned>(sizeof(StringMapEntry))+ + KeyLength+1; +- unsigned Alignment = alignof<StringMapEntry>(); ++ unsigned Alignment = alignOf<StringMapEntry>(); + + StringMapEntry *NewItem = + static_cast<StringMapEntry*>(Allocator.Allocate(AllocSize,Alignment)); +Index: include/llvm/Support/AlignOf.h +=================================================================== +--- include/llvm/Support/AlignOf.h (revision 117773) ++++ include/llvm/Support/AlignOf.h (revision 117774) +@@ -49,12 +49,12 @@ + + }; + +-/// alignof - A templated function that returns the mininum alignment of ++/// alignOf - A templated function that returns the mininum alignment of + /// of a type. This provides no extra functionality beyond the AlignOf + /// class besides some cosmetic cleanliness. Example usage: +-/// alignof<int>() returns the alignment of an int. ++/// alignOf<int>() returns the alignment of an int. + template <typename T> +-static inline unsigned alignof() { return AlignOf<T>::Alignment; } ++static inline unsigned alignOf() { return AlignOf<T>::Alignment; } + + } // end namespace llvm + #endif +Index: include/llvm/Support/Allocator.h +=================================================================== +--- include/llvm/Support/Allocator.h (revision 117773) ++++ include/llvm/Support/Allocator.h (revision 117774) +@@ -201,7 +201,7 @@ + char *End = Slab == Allocator.CurSlab ? Allocator.CurPtr : + (char *)Slab + Slab->Size; + for (char *Ptr = (char*)(Slab+1); Ptr < End; Ptr += sizeof(T)) { +- Ptr = Allocator.AlignPtr(Ptr, alignof<T>()); ++ Ptr = Allocator.AlignPtr(Ptr, alignOf<T>()); + if (Ptr + sizeof(T) <= End) + reinterpret_cast<T*>(Ptr)->~T(); + } +Index: include/llvm/CodeGen/SlotIndexes.h +=================================================================== +--- include/llvm/CodeGen/SlotIndexes.h (revision 117773) ++++ include/llvm/CodeGen/SlotIndexes.h (revision 117774) +@@ -393,7 +393,7 @@ + IndexListEntry *entry = + static_cast<IndexListEntry*>( + ileAllocator.Allocate(sizeof(IndexListEntry), +- alignof<IndexListEntry>())); ++ alignOf<IndexListEntry>())); + + new (entry) IndexListEntry(mi, index); + |