Merge pull request #103 from Blizzard/inline

add inlining API.
This commit is contained in:
starkos 2015-07-05 12:21:53 -04:00
commit e04c4292ac
2 changed files with 24 additions and 0 deletions

View File

@ -483,6 +483,18 @@
}
}
api.register {
name = "inlining",
scope = "config",
kind = "string",
allowed = {
"Default",
"Disabled",
"Explicit",
"Auto"
}
}
api.register {
name = "callingconvention",
scope = "config",

View File

@ -318,6 +318,7 @@
m.bufferSecurityCheck,
m.treatWChar_tAsBuiltInType,
m.floatingPointModel,
m.inlineFunctionExpansion,
m.enableEnhancedInstructionSet,
m.multiProcessorCompilation,
m.additionalCompileOptions,
@ -1159,6 +1160,17 @@
end
end
function m.inlineFunctionExpansion(cfg)
if cfg.inlining then
local types = {
Default = "Default",
Disabled = "Disabled",
Explicit = "OnlyExplicitInline",
Auto = "AnySuitable",
}
p.w('<InlineFunctionExpansion>%s</InlineFunctionExpansion>', types[cfg.inlining])
end
end
function m.forceIncludes(cfg, condition)
if #cfg.forceincludes > 0 then