-
Notifications
You must be signed in to change notification settings - Fork 14.7k
[clang] [sanitizer] add pseudofunction to indicate array-bounds check #128977
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 7 commits
7c73db2
0fe2ba3
a16b7a8
ff406cc
694b23b
d0c5ee9
cf4d310
d4370dc
aaffd83
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -355,12 +355,12 @@ class CGDebugInfo { | |
llvm::ArrayRef<llvm::Metadata *> PreviousFieldsDI, const RecordDecl *RD); | ||
|
||
/// A cache that maps names of artificial inlined functions to subprograms. | ||
llvm::StringMap<llvm::DISubprogram *> InlinedTrapFuncMap; | ||
llvm::StringMap<llvm::DISubprogram *> InlinedSubprogramMap; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you rename in a separate NFC patch? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
||
/// A function that returns the subprogram corresponding to the artificial | ||
/// inlined function for traps. | ||
llvm::DISubprogram *createInlinedTrapSubprogram(StringRef FuncName, | ||
llvm::DIFile *FileScope); | ||
llvm::DISubprogram *createInlinedSubprogram(StringRef FuncName, | ||
llvm::DIFile *FileScope); | ||
|
||
/// Helpers for collecting fields of a record. | ||
/// @{ | ||
|
@@ -635,6 +635,13 @@ class CGDebugInfo { | |
llvm::DILocation *CreateTrapFailureMessageFor(llvm::DebugLoc TrapLocation, | ||
StringRef Category, | ||
StringRef FailureMsg); | ||
/// Create a debug location from `Location` that adds an artificial inline | ||
/// frame where the frame name is FuncName | ||
/// | ||
/// This is used to indiciate instructions that come from compiler | ||
/// instrumentation. | ||
llvm::DILocation *CreateSyntheticInline(llvm::DebugLoc Location, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit. Maybe call it There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||
StringRef FuncName); | ||
|
||
private: | ||
/// Emit call to llvm.dbg.declare for a variable declaration. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit. The name
TrapSP
doesn't make much sense here given this function isn't specifically for traps.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.