diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td index 71a344ef481d..137e85194269 100644 --- a/clang/include/clang/Driver/Options.td +++ b/clang/include/clang/Driver/Options.td @@ -3258,14 +3258,17 @@ def fomit_frame_pointer : Flag<["-"], "fomit-frame-pointer">, Group, "Some stack unwinding cases, such as profilers and sanitizers, may prefer specifying -fno-omit-frame-pointer. " "On many targets, -O1 and higher omit the frame pointer by default. " "-m[no-]omit-leaf-frame-pointer takes precedence for leaf functions">; -def fft : Flag<["-"], "fft">, Group, Flags<[CC1Option, NoArgumentUnused]>, +def fft : Flag<["-"], "fft">, Group, Flags<[NoArgumentUnused]>, + Visibility<[ClangOption, CC1Option]>, HelpText<"Parse FT pragmas and generate fault tolerant code.">; def fno_ft : Flag<["-"], "fno-ft">, Group, Flags<[NoArgumentUnused]>; def fft_debug_mode : Flag<["-"], "fft-debug-mode">, Group, - Flags<[CC1Option, NoArgumentUnused]>, + Flags<[NoArgumentUnused]>, + Visibility<[ClangOption, CC1Option]>, HelpText<"Display debug meesage of FT pragmas.">; def fft_nodebug_mode : Flag<["-"], "fft-nodebug-mode">, Group, - Flags<[CC1Option, NoArgumentUnused, HelpHidden]>; + Flags<[NoArgumentUnused, HelpHidden]>, + Visibility<[ClangOption, CC1Option]>; def fopenmp : Flag<["-"], "fopenmp">, Group, Flags<[NoArgumentUnused]>, Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>, diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index aeaca35ca097..67afec9eb55e 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -3490,10 +3490,10 @@ void CompilerInvocationBase::GenerateLangArgs(const LangOptions &Opts, // FT was requested via '-fft' if (Opts.FT) { - GenerateArg(Args, OPT_fft, SA); + GenerateArg(Consumer, OPT_fft); } if (Opts.FTDebugMode) { - GenerateArg(Args, OPT_fft_debug_mode, SA); + GenerateArg(Consumer, OPT_fft_debug_mode); } // OpenMP was requested via '-fopenmp', not implied by '-fopenmp-simd' or diff --git a/clang/tools/libclang/CIndex.cpp b/clang/tools/libclang/CIndex.cpp index 4aef03b7203d..44bfa8413017 100644 --- a/clang/tools/libclang/CIndex.cpp +++ b/clang/tools/libclang/CIndex.cpp @@ -2261,7 +2261,6 @@ class EnqueueVisitor : public ConstStmtVisitor, void EnqueueChildren(const OMPClause *S); void EnqueueChildren(const FTClause *S); void EnqueueChildren(const AnnotateAttr *A); - void EnqueueChildren(const FTClause *S); }; } // namespace @@ -2825,18 +2824,6 @@ void EnqueueVisitor::EnqueueChildren(const AnnotateAttr *A) { std::reverse(I, E); } -void EnqueueVisitor::EnqueueChildren(const FTClause *S) { - unsigned size = WL.size(); - FTClauseEnqueue Visitor(this); - Visitor.Visit(S); - if (size == WL.size()) - return; - // Now reverse the entries we just added. This will match the DFS - // ordering performed by the worklist. - VisitorWorkList::iterator I = WL.begin() + size, E = WL.end(); - std::reverse(I, E); -} - void EnqueueVisitor::VisitAddrLabelExpr(const AddrLabelExpr *E) { WL.push_back(LabelRefVisit(E->getLabel(), E->getLabelLoc(), Parent)); } diff --git a/llvm/include/llvm/Frontend/FT/FTKinds.def b/llvm/include/llvm/Frontend/FT/FTKinds.def index 0b53d8927dbf..a85ac8a8812e 100644 --- a/llvm/include/llvm/Frontend/FT/FTKinds.def +++ b/llvm/include/llvm/Frontend/FT/FTKinds.def @@ -23,6 +23,7 @@ #endif #define __FT_TYPE(VarName) FT_TYPE(VarName, Type::get##VarName##Ty(Ctx)) +#define __FT_PTR_TYPE(VarName) FT_TYPE(VarName, PointerType::get(Ctx, 0)) __FT_TYPE(Void) __FT_TYPE(Int1) @@ -30,23 +31,21 @@ __FT_TYPE(Int8) __FT_TYPE(Int16) __FT_TYPE(Int32) __FT_TYPE(Int64) -__FT_TYPE(Int8Ptr) -__FT_TYPE(Int16Ptr) -__FT_TYPE(Int32Ptr) -__FT_TYPE(Int64Ptr) +__FT_PTR_TYPE(Int8Ptr) +__FT_PTR_TYPE(Int16Ptr) +__FT_PTR_TYPE(Int32Ptr) +__FT_PTR_TYPE(Int64Ptr) __FT_TYPE(Double) FT_TYPE(SizeTy, M.getDataLayout().getIntPtrType(Ctx)) FT_TYPE(Int63, Type::getIntNTy(Ctx, 63)) -#define __FT_PTR_TYPE(NAME, BASE) FT_TYPE(NAME, BASE->getPointerTo()) +__FT_PTR_TYPE(VoidPtr) +__FT_PTR_TYPE(VoidPtrPtr) +__FT_PTR_TYPE(VoidPtrPtrPtr) -__FT_PTR_TYPE(VoidPtr, Int8) -__FT_PTR_TYPE(VoidPtrPtr, VoidPtr) -__FT_PTR_TYPE(VoidPtrPtrPtr, VoidPtrPtr) - -__FT_PTR_TYPE(Int8PtrPtr, Int8Ptr) -__FT_PTR_TYPE(Int8PtrPtrPtr, Int8PtrPtr) +__FT_PTR_TYPE(Int8PtrPtr) +__FT_PTR_TYPE(Int8PtrPtrPtr) #undef __FT_PTR_TYPE diff --git a/llvm/lib/Frontend/CMakeLists.txt b/llvm/lib/Frontend/CMakeLists.txt index 83d49d5604a7..9ce6e515062c 100644 --- a/llvm/lib/Frontend/CMakeLists.txt +++ b/llvm/lib/Frontend/CMakeLists.txt @@ -3,4 +3,3 @@ add_subdirectory(OpenACC) add_subdirectory(OpenMP) add_subdirectory(FT) add_subdirectory(Offloading) -add_subdirectory(FT)