]> granicus.if.org Git - clang/commitdiff
Const'ify CompilerInvocation::toArgs().
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Mon, 11 Jun 2012 03:34:26 +0000 (03:34 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Mon, 11 Jun 2012 03:34:26 +0000 (03:34 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158298 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Frontend/CompilerInvocation.h
lib/Frontend/CompilerInvocation.cpp

index 0d2260acbc691a9fe7471755f9b65a90f0a0bd59..19cd5b72c641b15a5697c946465c25504945cd9c 100644 (file)
@@ -127,7 +127,7 @@ public:
 
   /// toArgs - Convert the CompilerInvocation to a list of strings suitable for
   /// passing to CreateFromArgs.
-  void toArgs(std::vector<std::string> &Res);
+  void toArgs(std::vector<std::string> &Res) const;
 
   /// setLangDefaults - Set language defaults for the given input language and
   /// language standard in this CompilerInvocation.
index 35ffe4941cb5d82204e795392d8c676e4525edf4..99c338c8760db781877eb81ad7f0f01b554e7e9f 100644 (file)
@@ -896,7 +896,7 @@ static void TargetOptsToArgs(const TargetOptions &Opts,
     Res.push_back("-target-feature", Opts.Features[i]);
 }
 
-void CompilerInvocation::toArgs(std::vector<std::string> &Res) {
+void CompilerInvocation::toArgs(std::vector<std::string> &Res) const {
   ToArgsList List(Res);
   AnalyzerOptsToArgs(getAnalyzerOpts(), List);
   CodeGenOptsToArgs(getCodeGenOpts(), List);