add inlining API.

This commit is contained in:
Tom van Dijck 2015-06-08 11:06:18 -07:00
parent 65a69d6546
commit 962f1e5a2d
2 changed files with 24 additions and 0 deletions

View File

@ -466,6 +466,18 @@
}
}
api.register {
name = "inlining",
scope = "config",
kind = "string",
allowed = {
"Default",
"Disabled",
"Explicit",
"Implicit"
}
}
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,
@ -1125,6 +1126,17 @@
end
end
function m.inlineFunctionExpansion(cfg)
if cfg.inlining then
local types = {
Default = "Default",
Disabled = "Disabled",
Explicit = "OnlyExplicitInline",
Implicit = "AnySuitable",
}
p.w('<InlineFunctionExpansion>%s</InlineFunctionExpansion>', types[cfg.inlining])
end
end
function m.forceIncludes(cfg, condition)
if #cfg.forceincludes > 0 then