[llvm-commits] [poolalloc] r166027 - /poolalloc/trunk/lib/DSA/DataStructure.cpp

John Criswell criswell at uiuc.edu
Tue Oct 16 09:37:20 PDT 2012


Author: criswell
Date: Tue Oct 16 11:37:20 2012
New Revision: 166027

URL: http://llvm.org/viewvc/llvm-project?rev=166027&view=rev
Log:
Updated to the new LLVM API which requires that the address space be specified
when finding the size of a pointer from the DataLayout class.

Modified:
    poolalloc/trunk/lib/DSA/DataStructure.cpp

Modified: poolalloc/trunk/lib/DSA/DataStructure.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/DataStructure.cpp?rev=166027&r1=166026&r2=166027&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/DataStructure.cpp (original)
+++ poolalloc/trunk/lib/DSA/DataStructure.cpp Tue Oct 16 11:37:20 2012
@@ -353,8 +353,9 @@
     for (svset<Type*>::const_iterator ni = TyMap[offset]->begin(),
          ne = TyMap[offset]->end(); ni != ne; ++ni) {
       if((*ni)->isPointerTy()) {
+        PointerType * PT = dyn_cast<PointerType>(*ni);
         pointerTy = true;
-        ptrSize = TD.getPointerSize();
+        ptrSize = TD.getPointerSize(PT->getAddressSpace());
       }
       if((*ni)->isIntegerTy()) {
         integerTy = true;





More information about the llvm-commits mailing list