mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Swift Bridging: use C++ instead of C bridging for the optimizer
This commit is contained in:
@@ -104,6 +104,22 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
size_t getCount() const {
|
||||
switch (kind) {
|
||||
case Kind::empty: return 0;
|
||||
case Kind::singleFunction: return 1;
|
||||
case Kind::multipleCallees: return ((Callees *)functionOrCallees)->size();
|
||||
}
|
||||
}
|
||||
|
||||
SILFunction *get(unsigned index) const {
|
||||
switch (kind) {
|
||||
case Kind::empty: llvm_unreachable("empty callee list");
|
||||
case Kind::singleFunction: return (SILFunction *)functionOrCallees;
|
||||
case Kind::multipleCallees: return ((Callees *)functionOrCallees)->operator[](index);
|
||||
}
|
||||
}
|
||||
|
||||
bool isIncomplete() const { return incomplete; }
|
||||
|
||||
/// Returns true if all callees are known and not external.
|
||||
|
||||
Reference in New Issue
Block a user