mirror of
https://github.com/github/codeql.git
synced 2026-04-26 01:05:15 +02:00
C#: Cache IRType like for C++
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
private import internal.IRTypeInternal
|
||||
|
||||
cached
|
||||
private newtype TIRType =
|
||||
TIRVoidType() or
|
||||
TIRUnknownType() or
|
||||
|
||||
@@ -144,6 +144,7 @@ private IRType getIRTypeForPRValue(Type type) {
|
||||
|
||||
string getOpaqueTagIdentityString(Type tag) { result = tag.getQualifiedName() }
|
||||
|
||||
cached
|
||||
private newtype TCSharpType =
|
||||
TPRValueType(Type type) { exists(getIRTypeForPRValue(type)) } or
|
||||
TGLValueAddressType(Type type) { any() } or
|
||||
@@ -163,6 +164,7 @@ class CSharpType extends TCSharpType {
|
||||
* Gets the `IRType` that represents this `CSharpType`. Many different `CSharpType`s can map to a
|
||||
* single `IRType`.
|
||||
*/
|
||||
cached
|
||||
abstract IRType getIRType();
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user