Skip to content

Commit c526532

Browse files
author
Dave Bartolomeo
committed
C++: QLDoc for IRConfiguration.qll
1 parent 87f0b0e commit c526532

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

cpp/ql/src/semmle/code/cpp/ir/implementation/IRConfiguration.qll

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,21 @@ private newtype TIRConfiguration = MkIRConfiguration()
1010
* The query can extend this class to control which functions have IR generated for them.
1111
*/
1212
class IRConfiguration extends TIRConfiguration {
13+
/** Gets a textual representation of this element. */
1314
string toString() { result = "IRConfiguration" }
1415

1516
/**
1617
* Holds if IR should be created for function `func`. By default, holds for all functions.
1718
*/
1819
predicate shouldCreateIRForFunction(Language::Function func) { any() }
1920

21+
/**
22+
* Holds if the strings used as part of an IR dump should be generated for function `func`.
23+
*
24+
* This predicate is overridden in `PrintIR.qll` to avoid the expense of generating a large number
25+
* of debug strings for IR that will not be dumped. We still generate the actual IR for these
26+
* functions, however, to preserve the results of any interprocedural analysis.
27+
*/
2028
predicate shouldEvaluateDebugStringsForFunction(Language::Function func) { any() }
2129
}
2230

@@ -26,6 +34,7 @@ private newtype TIREscapeAnalysisConfiguration = MkIREscapeAnalysisConfiguration
2634
* The query can extend this class to control what escape analysis is used when generating SSA.
2735
*/
2836
class IREscapeAnalysisConfiguration extends TIREscapeAnalysisConfiguration {
37+
/** Gets a textual representation of this element. */
2938
string toString() { result = "IREscapeAnalysisConfiguration" }
3039

3140
/**

csharp/ql/src/experimental/ir/implementation/IRConfiguration.qll

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,21 @@ private newtype TIRConfiguration = MkIRConfiguration()
1010
* The query can extend this class to control which functions have IR generated for them.
1111
*/
1212
class IRConfiguration extends TIRConfiguration {
13+
/** Gets a textual representation of this element. */
1314
string toString() { result = "IRConfiguration" }
1415

1516
/**
1617
* Holds if IR should be created for function `func`. By default, holds for all functions.
1718
*/
1819
predicate shouldCreateIRForFunction(Language::Function func) { any() }
1920

21+
/**
22+
* Holds if the strings used as part of an IR dump should be generated for function `func`.
23+
*
24+
* This predicate is overridden in `PrintIR.qll` to avoid the expense of generating a large number
25+
* of debug strings for IR that will not be dumped. We still generate the actual IR for these
26+
* functions, however, to preserve the results of any interprocedural analysis.
27+
*/
2028
predicate shouldEvaluateDebugStringsForFunction(Language::Function func) { any() }
2129
}
2230

@@ -26,6 +34,7 @@ private newtype TIREscapeAnalysisConfiguration = MkIREscapeAnalysisConfiguration
2634
* The query can extend this class to control what escape analysis is used when generating SSA.
2735
*/
2836
class IREscapeAnalysisConfiguration extends TIREscapeAnalysisConfiguration {
37+
/** Gets a textual representation of this element. */
2938
string toString() { result = "IREscapeAnalysisConfiguration" }
3039

3140
/**

0 commit comments

Comments
 (0)