[cfe-commits] r128138 - /cfe/trunk/lib/Frontend/ASTUnit.cpp
Chris Lattner
clattner at apple.com
Tue Mar 22 20:10:02 PDT 2011
On Mar 22, 2011, at 7:16 PM, Ted Kremenek wrote:
> Author: kremenek
> Date: Tue Mar 22 21:16:41 2011
> New Revision: 128138
>
> URL: http://llvm.org/viewvc/llvm-project?rev=128138&view=rev
> Log:
> std::vector::data() is not portable to VS. Use a gross hack instead.
Can you just change this to use a SmallVector? Alternatively, BuildCompilation could also just take an llvm::ArrayRef which already handles this.
-Chris
>
> Modified:
> cfe/trunk/lib/Frontend/ASTUnit.cpp
>
> Modified: cfe/trunk/lib/Frontend/ASTUnit.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/ASTUnit.cpp?rev=128138&r1=128137&r2=128138&view=diff
> ==============================================================================
> --- cfe/trunk/lib/Frontend/ASTUnit.cpp (original)
> +++ cfe/trunk/lib/Frontend/ASTUnit.cpp Tue Mar 22 21:16:41 2011
> @@ -1662,7 +1662,9 @@
> TheDriver.setCheckInputsExist(false);
>
> llvm::OwningPtr<driver::Compilation> C(
> - TheDriver.BuildCompilation(Args->size(), Args->data()));
> + TheDriver.BuildCompilation(
> + Args->size(),
> + Args->size() ? &(*Args)[0] : 0 )); // std::vector::data() not portable
>
> // Just print the cc1 options if -### was present.
> if (C->getArgs().hasArg(driver::options::OPT__HASH_HASH_HASH)) {
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
More information about the cfe-commits
mailing list