[cfe-commits] r56987 - /cfe/trunk/Driver/RewriteBlocks.cpp

Steve Naroff snaroff at apple.com
Thu Oct 2 17:12:09 PDT 2008


Author: snaroff
Date: Thu Oct  2 19:12:09 2008
New Revision: 56987

URL: http://llvm.org/viewvc/llvm-project?rev=56987&view=rev
Log:
Get the right location to insert the synthesized block literals/functions.

Modified:
    cfe/trunk/Driver/RewriteBlocks.cpp

Modified: cfe/trunk/Driver/RewriteBlocks.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Driver/RewriteBlocks.cpp?rev=56987&r1=56986&r2=56987&view=diff

==============================================================================
--- cfe/trunk/Driver/RewriteBlocks.cpp (original)
+++ cfe/trunk/Driver/RewriteBlocks.cpp Thu Oct  2 19:12:09 2008
@@ -554,7 +554,7 @@
 }
 
 void RewriteBlocks::InsertBlockLiteralsWithinFunction(FunctionDecl *FD) {
-  SourceLocation FunLocStart = FD->getLocation();
+  SourceLocation FunLocStart = FD->getTypeSpecStartLoc();
   const char *FuncName = FD->getName();
   
   SynthesizeBlockLiterals(FunLocStart, FuncName);





More information about the cfe-commits mailing list