mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Add def file for semantics attributes and use constants instead of cstring literals
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
|
||||
#define DEBUG_TYPE "objectoutliner"
|
||||
#include "swift/AST/ASTMangler.h"
|
||||
#include "swift/Basic/Semantics.h"
|
||||
#include "swift/SIL/DebugUtils.h"
|
||||
#include "swift/SIL/SILBuilder.h"
|
||||
#include "swift/SILOptimizer/PassManager/Transforms.h"
|
||||
@@ -148,7 +149,7 @@ bool ObjectOutliner::isValidUseOfObject(SILInstruction *I, bool isCOWObject,
|
||||
// There should only be a single call to findStringSwitchCase. But even
|
||||
// if there are multiple calls, it's not problem - we'll just optimize the
|
||||
// last one we find.
|
||||
if (cast<ApplyInst>(I)->hasSemantics("findStringSwitchCase"))
|
||||
if (cast<ApplyInst>(I)->hasSemantics(FIND_STRING_SWITCH_CASE))
|
||||
*FindStringCall = cast<ApplyInst>(I);
|
||||
return true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user