[all-commits] [llvm/llvm-project] c0bc46: [Clang] Give error message for invalid profile pat...
Aiden Grossman via All-commits
all-commits at lists.llvm.org
Fri Sep 16 12:46:28 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c0bc461999fdac918dd26867947c24eb6235c8d0
https://github.com/llvm/llvm-project/commit/c0bc461999fdac918dd26867947c24eb6235c8d0
Author: Aiden Grossman <agrossman154 at yahoo.com>
Date: 2022-09-16 (Fri, 16 Sep 2022)
Changed paths:
M clang/lib/CodeGen/CodeGenModule.cpp
M clang/lib/Frontend/CompilerInvocation.cpp
A clang/test/Profile/profile-does-not-exist-ir.c
M clang/test/Profile/profile-does-not-exist.c
Log Message:
-----------
[Clang] Give error message for invalid profile path when compiling IR
Before this patch, when compiling an IR file (eg the .llvmbc section
from an object file compiled with -Xclang -fembed-bitcode=all) and
profile data was passed in using the -fprofile-instrument-use-path
flag, there would be no error printed (as the previous implementation
relied on the error getting caught again in the constructor of
CodeGenModule which isn't called when -x ir is set). This patch
moves the error checking directly to where the error is caught
originally rather than failing silently in setPGOUseInstrumentor and
waiting to catch it in CodeGenModule to print diagnostic information to
the user.
Regression test added.
Reviewed By: xur, mtrofin
Differential Revision: https://reviews.llvm.org/D132991
More information about the All-commits
mailing list