mirror of
https://github.com/github/codeql.git
synced 2026-04-29 18:55:14 +02:00
Merge pull request #2244 from jbj/IRType-cached
C++: Minimal caching of the IR type system
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
private import internal.IRTypeInternal
|
||||
|
||||
cached
|
||||
private newtype TIRType =
|
||||
TIRVoidType() or
|
||||
TIRUnknownType() or
|
||||
|
||||
@@ -175,6 +175,7 @@ private IRType getIRTypeForPRValue(Type type) {
|
||||
)
|
||||
}
|
||||
|
||||
cached
|
||||
private newtype TCppType =
|
||||
TPRValueType(Type type) { exists(getIRTypeForPRValue(type)) } or
|
||||
TFunctionGLValueType() or
|
||||
@@ -203,6 +204,7 @@ class CppType extends TCppType {
|
||||
* Gets the `IRType` that represents this `CppType`. Many different `CppType`s can map to a single
|
||||
* `IRType`.
|
||||
*/
|
||||
cached
|
||||
IRType getIRType() { none() }
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user