Index: lib/Driver/ToolChains/Clang.cpp =================================================================== --- lib/Driver/ToolChains/Clang.cpp +++ lib/Driver/ToolChains/Clang.cpp @@ -4225,7 +4225,6 @@ options::OPT_fuse_cxa_atexit, options::OPT_fno_use_cxa_atexit, !RawTriple.isOSWindows() && RawTriple.getOS() != llvm::Triple::Solaris && - getToolChain().getArch() != llvm::Triple::hexagon && getToolChain().getArch() != llvm::Triple::xcore && ((RawTriple.getVendor() != llvm::Triple::MipsTechnologies) || RawTriple.hasEnvironment())) || Index: test/Driver/cxa-atexit.cpp =================================================================== --- test/Driver/cxa-atexit.cpp +++ test/Driver/cxa-atexit.cpp @@ -20,7 +20,7 @@ // CHECK-WINDOWS: "-fno-use-cxa-atexit" // CHECK-SOLARIS: "-fno-use-cxa-atexit" -// CHECK-HEXAGON: "-fno-use-cxa-atexit" +// CHECK-HEXAGON-NOT: "-fno-use-cxa-atexit" // CHECK-XCORE: "-fno-use-cxa-atexit" // CHECK-MTI: "-fno-use-cxa-atexit" // CHECK-MIPS-NOT: "-fno-use-cxa-atexit"