Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(246)

Side by Side Diff: lib/Frontend/CompilerInvocation.cpp

Issue 1323073010: Use LLVM args to handle -malign-double option (Closed) Base URL: https://chromium.googlesource.com/a/native_client/pnacl-clang.git@master
Patch Set: Review feedback addressed Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/Basic/Targets.cpp ('k') | test/Driver/malign-double.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===--- CompilerInvocation.cpp -------------------------------------------===// 1 //===--- CompilerInvocation.cpp -------------------------------------------===//
2 // 2 //
3 // The LLVM Compiler Infrastructure 3 // The LLVM Compiler Infrastructure
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 9
10 #include "clang/Frontend/CompilerInvocation.h" 10 #include "clang/Frontend/CompilerInvocation.h"
(...skipping 1808 matching lines...) Expand 10 before | Expand all | Expand 10 after
1819 } 1819 }
1820 1820
1821 static void ParseTargetArgs(TargetOptions &Opts, ArgList &Args) { 1821 static void ParseTargetArgs(TargetOptions &Opts, ArgList &Args) {
1822 using namespace options; 1822 using namespace options;
1823 Opts.ABI = Args.getLastArgValue(OPT_target_abi); 1823 Opts.ABI = Args.getLastArgValue(OPT_target_abi);
1824 Opts.CPU = Args.getLastArgValue(OPT_target_cpu); 1824 Opts.CPU = Args.getLastArgValue(OPT_target_cpu);
1825 Opts.FPMath = Args.getLastArgValue(OPT_mfpmath); 1825 Opts.FPMath = Args.getLastArgValue(OPT_mfpmath);
1826 Opts.FeaturesAsWritten = Args.getAllArgValues(OPT_target_feature); 1826 Opts.FeaturesAsWritten = Args.getAllArgValues(OPT_target_feature);
1827 Opts.LinkerVersion = Args.getLastArgValue(OPT_target_linker_version); 1827 Opts.LinkerVersion = Args.getLastArgValue(OPT_target_linker_version);
1828 Opts.Triple = llvm::Triple::normalize(Args.getLastArgValue(OPT_triple)); 1828 Opts.Triple = llvm::Triple::normalize(Args.getLastArgValue(OPT_triple));
1829 Opts.LLVMArgs = Args.getAllArgValues(OPT_mllvm); // @LOCALMOD
1829 1830
1830 // Use the default target triple if unspecified. 1831 // Use the default target triple if unspecified.
1831 if (Opts.Triple.empty()) 1832 if (Opts.Triple.empty())
1832 Opts.Triple = llvm::sys::getDefaultTargetTriple(); 1833 Opts.Triple = llvm::sys::getDefaultTargetTriple();
1833 } 1834 }
1834 1835
1835 bool CompilerInvocation::CreateFromArgs(CompilerInvocation &Res, 1836 bool CompilerInvocation::CreateFromArgs(CompilerInvocation &Res,
1836 const char *const *ArgBegin, 1837 const char *const *ArgBegin,
1837 const char *const *ArgEnd, 1838 const char *const *ArgEnd,
1838 DiagnosticsEngine &Diags) { 1839 DiagnosticsEngine &Diags) {
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
2092 vfs::getVFSFromYAML(std::move(Buffer.get()), /*DiagHandler*/ nullptr); 2093 vfs::getVFSFromYAML(std::move(Buffer.get()), /*DiagHandler*/ nullptr);
2093 if (!FS.get()) { 2094 if (!FS.get()) {
2094 Diags.Report(diag::err_invalid_vfs_overlay) << File; 2095 Diags.Report(diag::err_invalid_vfs_overlay) << File;
2095 return IntrusiveRefCntPtr<vfs::FileSystem>(); 2096 return IntrusiveRefCntPtr<vfs::FileSystem>();
2096 } 2097 }
2097 Overlay->pushOverlay(FS); 2098 Overlay->pushOverlay(FS);
2098 } 2099 }
2099 return Overlay; 2100 return Overlay;
2100 } 2101 }
2101 } // end namespace clang 2102 } // end namespace clang
OLDNEW
« no previous file with comments | « lib/Basic/Targets.cpp ('k') | test/Driver/malign-double.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698