Author: d0k
Date: Sat Jan 30 10:23:25 2010
New Revision: 94895
URL: http://llvm.org/viewvc/llvm-project?rev=94895&view=rev
Log:
PCHReader doesn't implement classof so dyn_casting it will do really weird
stuff. Use a static_cast instead.
I don't know if this hack is the right fix. Doug, please take a look.
Modified:
cfe/trunk/lib/Frontend/ASTUnit.cpp
cfe/trunk/test/Index/remap-load.c
Modified: cfe/trunk/lib/Frontend/ASTUnit.cpp
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/ASTUnit.cpp?rev=94895&r1=94894&r2=94895&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/ASTUnit.cpp (original)
+++ cfe/trunk/lib/Frontend/ASTUnit.cpp Sat Jan 30 10:23:25 2010
@@ -98,7 +98,7 @@
const std::string &ASTUnit::getPCHFileName() {
assert(isMainFileAST() && "Not an ASTUnit from a PCH file!");
- return dyn_cast<PCHReader>(Ctx->getExternalSource())->getFileName();
+ return static_cast<PCHReader *>(Ctx->getExternalSource())->getFileName();
}
ASTUnit *ASTUnit::LoadFromPCHFile(const std::string &Filename,
Modified: cfe/trunk/test/Index/remap-load.c
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/remap-load.c?rev=94895&r1=94894&r2=94895&view=diff
==============================================================================
--- cfe/trunk/test/Index/remap-load.c (original)
+++ cfe/trunk/test/Index/remap-load.c Sat Jan 30 10:23:25 2010
@@ -1,15 +1,11 @@
-// UN: c-index-test -test-load-source all
-remap-file="%s;%S/Inputs/remap-load-to.c" %s | FileCheck -check-prefix=CHECK %s
-// UN: CINDEXTEST_USE_EXTERNAL_AST_GENERATION=1 c-index-test -test-load-source
all -remap-file="%s;%S/Inputs/remap-load-to.c" %s | FileCheck
-check-prefix=CHECK %s
-
-// disable this for now, it's failing sporadically.
-// RUN: false
-// XFAIL: *
+// RUN: c-index-test -test-load-source all
-remap-file="%s;%S/Inputs/remap-load-to.c" %s | FileCheck -check-prefix=CHECK %s
+// RUN: CINDEXTEST_USE_EXTERNAL_AST_GENERATION=1 c-index-test
-test-load-source all -remap-file="%s;%S/Inputs/remap-load-to.c" %s | FileCheck
-check-prefix=CHECK %s
// CHECK: remap-load.c:1:5: FunctionDecl=foo:1:5 (Definition) [Extent=1:5:3:1]
// CHECK: remap-load.c:1:13: ParmDecl=parm1:1:13 (Definition) [Extent=1:9:1:17]
// CHECK: remap-load.c:1:26: ParmDecl=parm2:1:26 (Definition)
[Extent=1:20:1:30]
-// CHECK: remap-load.c:1:5: UnexposedStmt=foo [Extent=1:33:3:1]
-// CHECK: remap-load.c:1:5: UnexposedStmt=foo [Extent=2:3:2:22]
+// CHECK: remap-load.c:1:5: UnexposedStmt= [Extent=1:33:3:1]
+// CHECK: remap-load.c:1:5: UnexposedStmt= [Extent=2:3:2:22]
// CHECK: remap-load.c:2:10: UnexposedExpr= [Extent=2:10:2:22]
// CHECK: remap-load.c:2:10: UnexposedExpr= [Extent=2:10:2:22]
// CHECK: remap-load.c:2:10: UnexposedExpr=parm1:1:13 [Extent=2:10:2:14]
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits