sbc100 created this revision. Herald added subscribers: cfe-commits, sunfish, aheejin, jgravelle-google, dschuff, jfb.
Repository: rC Clang https://reviews.llvm.org/D43035 Files: include/clang/Basic/TargetCXXABI.h lib/Basic/Targets.cpp lib/Basic/Targets/WebAssembly.cpp lib/CodeGen/CGBuiltin.cpp lib/CodeGen/TargetInfo.cpp lib/Driver/Driver.cpp lib/Driver/ToolChain.cpp lib/Driver/ToolChains/Clang.cpp lib/Driver/ToolChains/CommonArgs.cpp test/Preprocessor/init.c
Index: test/Preprocessor/init.c =================================================================== --- test/Preprocessor/init.c +++ test/Preprocessor/init.c @@ -9382,11 +9382,9 @@ // WEBASSEMBLY32-NOT:#define __unix // WEBASSEMBLY32-NOT:#define __unix__ // WEBASSEMBLY32-NEXT:#define __wasm 1 -// WEBASSEMBLY32-NEXT:#define __wasm32 1 -// WEBASSEMBLY32-NEXT:#define __wasm32__ 1 +// WEBASSEMBLY32-NEXT:#define __wasm__ 1 // WEBASSEMBLY32-NOT:#define __wasm64 // WEBASSEMBLY32-NOT:#define __wasm64__ -// WEBASSEMBLY32-NEXT:#define __wasm__ 1 // // RUN: %clang_cc1 -E -dM -ffreestanding -triple=wasm64-unknown-unknown \ // RUN: < /dev/null \ Index: lib/Driver/ToolChains/CommonArgs.cpp =================================================================== --- lib/Driver/ToolChains/CommonArgs.cpp +++ lib/Driver/ToolChains/CommonArgs.cpp @@ -347,7 +347,7 @@ case llvm::Triple::amdgcn: return getR600TargetGPU(Args); - case llvm::Triple::wasm32: + case llvm::Triple::wasm: case llvm::Triple::wasm64: return getWebAssemblyTargetCPU(Args); } Index: lib/Driver/ToolChains/Clang.cpp =================================================================== --- lib/Driver/ToolChains/Clang.cpp +++ lib/Driver/ToolChains/Clang.cpp @@ -346,7 +346,7 @@ case llvm::Triple::hexagon: hexagon::getHexagonTargetFeatures(D, Args, Features); break; - case llvm::Triple::wasm32: + case llvm::Triple::wasm: case llvm::Triple::wasm64: getWebAssemblyTargetFeatures(Args, Features); break; @@ -524,7 +524,7 @@ const llvm::Triple &Triple) { switch (Triple.getArch()) { case llvm::Triple::xcore: - case llvm::Triple::wasm32: + case llvm::Triple::wasm: case llvm::Triple::wasm64: // XCore never wants frame pointers, regardless of OS. // WebAssembly never wants frame pointers. @@ -1309,7 +1309,7 @@ return false; case llvm::Triple::xcore: - case llvm::Triple::wasm32: + case llvm::Triple::wasm: case llvm::Triple::wasm64: return true; } @@ -1434,7 +1434,7 @@ AddHexagonTargetArgs(Args, CmdArgs); break; - case llvm::Triple::wasm32: + case llvm::Triple::wasm: case llvm::Triple::wasm64: AddWebAssemblyTargetArgs(Args, CmdArgs); break; Index: lib/Driver/ToolChain.cpp =================================================================== --- lib/Driver/ToolChain.cpp +++ lib/Driver/ToolChain.cpp @@ -480,7 +480,7 @@ Triple.getArch() == llvm::Triple::armeb || Triple.getArch() == llvm::Triple::thumb || Triple.getArch() == llvm::Triple::thumbeb || - Triple.getArch() == llvm::Triple::wasm32 || + Triple.getArch() == llvm::Triple::wasm || Triple.getArch() == llvm::Triple::wasm64; } else if (Model == "posix") return true; @@ -793,7 +793,7 @@ getTriple().getArch() == llvm::Triple::x86_64 || getTriple().getArch() == llvm::Triple::arm || getTriple().getArch() == llvm::Triple::aarch64 || - getTriple().getArch() == llvm::Triple::wasm32 || + getTriple().getArch() == llvm::Triple::wasm || getTriple().getArch() == llvm::Triple::wasm64) Res |= CFIICall; return Res; Index: lib/Driver/Driver.cpp =================================================================== --- lib/Driver/Driver.cpp +++ lib/Driver/Driver.cpp @@ -4193,7 +4193,7 @@ case llvm::Triple::xcore: TC = llvm::make_unique<toolchains::XCoreToolChain>(*this, Target, Args); break; - case llvm::Triple::wasm32: + case llvm::Triple::wasm: case llvm::Triple::wasm64: TC = llvm::make_unique<toolchains::WebAssembly>(*this, Target, Args); break; Index: lib/CodeGen/TargetInfo.cpp =================================================================== --- lib/CodeGen/TargetInfo.cpp +++ lib/CodeGen/TargetInfo.cpp @@ -9000,7 +9000,7 @@ return SetCGInfo(new AArch64TargetCodeGenInfo(Types, Kind)); } - case llvm::Triple::wasm32: + case llvm::Triple::wasm: case llvm::Triple::wasm64: return SetCGInfo(new WebAssemblyTargetCodeGenInfo(Types)); Index: lib/CodeGen/CGBuiltin.cpp =================================================================== --- lib/CodeGen/CGBuiltin.cpp +++ lib/CodeGen/CGBuiltin.cpp @@ -3416,7 +3416,7 @@ case llvm::Triple::nvptx: case llvm::Triple::nvptx64: return CGF->EmitNVPTXBuiltinExpr(BuiltinID, E); - case llvm::Triple::wasm32: + case llvm::Triple::wasm: case llvm::Triple::wasm64: return CGF->EmitWebAssemblyBuiltinExpr(BuiltinID, E); case llvm::Triple::hexagon: Index: lib/Basic/Targets/WebAssembly.cpp =================================================================== --- lib/Basic/Targets/WebAssembly.cpp +++ lib/Basic/Targets/WebAssembly.cpp @@ -95,7 +95,7 @@ void WebAssembly32TargetInfo::getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const { WebAssemblyTargetInfo::getTargetDefines(Opts, Builder); - defineCPUMacros(Builder, "wasm32", /*Tuning=*/false); + defineCPUMacros(Builder, "wasm", /*Tuning=*/false); } void WebAssembly64TargetInfo::getTargetDefines(const LangOptions &Opts, Index: lib/Basic/Targets.cpp =================================================================== --- lib/Basic/Targets.cpp +++ lib/Basic/Targets.cpp @@ -562,7 +562,7 @@ return nullptr; return new SPIR64TargetInfo(Triple, Opts); } - case llvm::Triple::wasm32: + case llvm::Triple::wasm: if (Triple.getSubArch() != llvm::Triple::NoSubArch || Triple.getVendor() != llvm::Triple::UnknownVendor || Triple.getOS() != llvm::Triple::UnknownOS || Index: include/clang/Basic/TargetCXXABI.h =================================================================== --- include/clang/Basic/TargetCXXABI.h +++ include/clang/Basic/TargetCXXABI.h @@ -95,7 +95,7 @@ /// - representation of member function pointers is adjusted, as in ARM; /// - member functions are not specially aligned; /// - constructors and destructors return 'this', as in ARM; - /// - guard variables are 32-bit on wasm32, as in ARM; + /// - guard variables are 32-bit on wasm, as in ARM; /// - unused bits of guard variables are reserved, as in ARM; /// - inline functions are never key functions, as in ARM; /// - C++11 POD rules are used for tail padding, as in iOS64.
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits