r176544 - revert r176531 due to clan-native-arm fails

Weiming Zhao weimingz at codeaurora.org
Tue Mar 5 18:08:54 PST 2013


Author: weimingz
Date: Tue Mar  5 20:08:54 2013
New Revision: 176544

URL: http://llvm.org/viewvc/llvm-project?rev=176544&view=rev
Log:
revert r176531 due to clan-native-arm fails


Removed:
    cfe/trunk/test/Driver/arm-mabi.c
Modified:
    cfe/trunk/include/clang/Basic/DiagnosticCommonKinds.td
    cfe/trunk/lib/Frontend/CompilerInvocation.cpp

Modified: cfe/trunk/include/clang/Basic/DiagnosticCommonKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticCommonKinds.td?rev=176544&r1=176543&r2=176544&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticCommonKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticCommonKinds.td Tue Mar  5 20:08:54 2013
@@ -107,8 +107,6 @@ def err_target_unknown_cpu : Error<"unkn
 def err_target_unknown_abi : Error<"unknown target ABI '%0'">;
 def err_target_unknown_cxxabi : Error<"unknown C++ ABI '%0'">;
 def err_target_invalid_feature : Error<"invalid target feature '%0'">;
-def warn_target_override_abi: Warning<"unused environment '%0'">,
-  InGroup<Unused>;
 
 // Source manager
 def err_cannot_open_file : Error<"cannot open file '%0': %1">, DefaultFatal;

Modified: cfe/trunk/lib/Frontend/CompilerInvocation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInvocation.cpp?rev=176544&r1=176543&r2=176544&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CompilerInvocation.cpp (original)
+++ cfe/trunk/lib/Frontend/CompilerInvocation.cpp Tue Mar  5 20:08:54 2013
@@ -1471,8 +1471,7 @@ static void ParsePreprocessorOutputArgs(
   Opts.RewriteIncludes = Args.hasArg(OPT_frewrite_includes);
 }
 
-static void ParseTargetArgs(TargetOptions &Opts, ArgList &Args,
-                            DiagnosticsEngine &Diags) {
+static void ParseTargetArgs(TargetOptions &Opts, ArgList &Args) {
   using namespace options;
   Opts.ABI = Args.getLastArgValue(OPT_target_abi);
   Opts.CXXABI = Args.getLastArgValue(OPT_cxx_abi);
@@ -1484,21 +1483,6 @@ static void ParseTargetArgs(TargetOption
   // Use the default target triple if unspecified.
   if (Opts.Triple.empty())
     Opts.Triple = llvm::sys::getDefaultTargetTriple();
-
-  // Check if Opts.ABI conflicts with the environment of triple on ARM.
-  llvm::Triple T(Opts.Triple);
-  if (T.getArch() == llvm::Triple::arm && !Opts.ABI.empty() &&
-      !T.getEnvironmentName().empty()) {
-    llvm::Triple::EnvironmentType env = T.getEnvironment();
-    // Env and ABI (Triple::EnvironmentType and ARMABIInfo::ABIKind) are not
-    // 1-to-1 mapping. Later on, Env will be overrided by ABI option when
-    // computing ARMABIInfo.
-    bool isOpsEABI = StringRef(Opts.ABI).startswith("aapcs");
-    bool isEnvEABI = (env == llvm::Triple::GNUEABI || env == llvm::Triple::EABI
-        || env == llvm::Triple::Android);
-    if (isEnvEABI != isOpsEABI)
-      Diags.Report(diag::warn_target_override_abi) << T.getEnvironmentName();
-  }
 }
 
 //
@@ -1563,7 +1547,7 @@ bool CompilerInvocation::CreateFromArgs(
   ParsePreprocessorArgs(Res.getPreprocessorOpts(), *Args, FileMgr, Diags);
   ParsePreprocessorOutputArgs(Res.getPreprocessorOutputOpts(), *Args,
                               Res.getFrontendOpts().ProgramAction);
-  ParseTargetArgs(Res.getTargetOpts(), *Args, Diags);
+  ParseTargetArgs(Res.getTargetOpts(), *Args);
 
   return Success;
 }

Removed: cfe/trunk/test/Driver/arm-mabi.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/arm-mabi.c?rev=176543&view=auto
==============================================================================
--- cfe/trunk/test/Driver/arm-mabi.c (original)
+++ cfe/trunk/test/Driver/arm-mabi.c (removed)
@@ -1,17 +0,0 @@
-// Test -targat and -mabi.
-
-// RUN: %clang -target arm-none-none-gnu -mabi=aapcs %s -c -S -o %t.s 2>&1 \
-// RUN:   | FileCheck --check-prefix=CHECK-WARN1 %s
-//CHECK-WARN1: warning: unused environment 'gnu'
-
-// RUN: %clang -target arm-none-none-gnueabi -mabi=apcs-gnu %s -c -S -o %t.s 2>&1 \
-// RUN:   | FileCheck --check-prefix=CHECK-WARN2 %s
-// CHECK-WARN2: warning: unused environment 'gnueabi'
-
-// RUN: %clang -target arm-none-none-gnueabi -mabi=aapcs-gnu %s -c -S -o %t.s 2>&1 \
-// RUN:   | FileCheck %s
-// CHECK-NOT: warning: unused environment
-
-// RUN: %clang -target arm-none-none-gnu -mabi=apcs-gnu %s -c -S -o %t.s 2>&1 \
-// RUN:   | FileCheck %s
-// CHECK-NOT: warning: unused environment





More information about the cfe-commits mailing list