[cfe-commits] r128105 - /cfe/trunk/tools/libclang/CIndex.cpp
Ted Kremenek
kremenek at apple.com
Tue Mar 22 13:16:19 PDT 2011
Author: kremenek
Date: Tue Mar 22 15:16:19 2011
New Revision: 128105
URL: http://llvm.org/viewvc/llvm-project?rev=128105&view=rev
Log:
Hopefully fix VS build by not using std::vector::data().
Modified:
cfe/trunk/tools/libclang/CIndex.cpp
Modified: cfe/trunk/tools/libclang/CIndex.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CIndex.cpp?rev=128105&r1=128104&r2=128105&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/CIndex.cpp (original)
+++ cfe/trunk/tools/libclang/CIndex.cpp Tue Mar 22 15:16:19 2011
@@ -2456,12 +2456,14 @@
unsigned NumErrors = Diags->getClient()->getNumErrors();
llvm::OwningPtr<ASTUnit> Unit(
- ASTUnit::LoadFromCommandLine(Args->data(), Args->data() + Args->size(),
+ ASTUnit::LoadFromCommandLine(Args->size() ? &(*Args)[0] : 0
+ /* vector::data() not portable */,
+ Args->size() ? (&(*Args)[0] + Args->size()) :0,
Diags,
CXXIdx->getClangResourcesPath(),
CXXIdx->getOnlyLocalDecls(),
/*CaptureDiagnostics=*/true,
- RemappedFiles->data(),
+ RemappedFiles->size() ? &(*RemappedFiles)[0]:0,
RemappedFiles->size(),
/*RemappedFilesKeepOriginalName=*/true,
PrecompilePreamble,
@@ -2600,7 +2602,8 @@
Buffer));
}
- if (!CXXUnit->Reparse(RemappedFiles->data(), RemappedFiles->size()))
+ if (!CXXUnit->Reparse(RemappedFiles->size() ? &(*RemappedFiles)[0] : 0,
+ RemappedFiles->size()))
RTUI->result = 0;
}
More information about the cfe-commits
mailing list