Author: Andrzej Warzynski
Date: 2020-12-14T16:10:07Z
New Revision: 6bbbe4a5746e65fb9b7efc8d525961994406a338

URL: 
https://github.com/llvm/llvm-project/commit/6bbbe4a5746e65fb9b7efc8d525961994406a338
DIFF: 
https://github.com/llvm/llvm-project/commit/6bbbe4a5746e65fb9b7efc8d525961994406a338.diff

LOG: [flang][driver] Fix a small bug (auto vs auto&)

This bug hasn't affected us yet as our usage is too basic, i.e. we don't
rely on the defaults provided by `SetDefaultFortranOpts` just yet. This
will change shortly.

Added: 
    

Modified: 
    flang/lib/Frontend/CompilerInvocation.cpp

Removed: 
    


################################################################################
diff  --git a/flang/lib/Frontend/CompilerInvocation.cpp 
b/flang/lib/Frontend/CompilerInvocation.cpp
index 85c2234da63c..8a6f66151324 100644
--- a/flang/lib/Frontend/CompilerInvocation.cpp
+++ b/flang/lib/Frontend/CompilerInvocation.cpp
@@ -185,7 +185,7 @@ bool CompilerInvocation::CreateFromArgs(CompilerInvocation 
&res,
 }
 
 void CompilerInvocation::SetDefaultFortranOpts() {
-  auto fortranOptions = fortranOpts();
+  auto &fortranOptions = fortranOpts();
 
   // These defaults are based on the defaults in f18/f18.cpp.
   std::vector<std::string> searchDirectories{"."s};


        
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to