pytorch/torch/csrc/jit/frontend/name_mangler.h
Peter Bell b2e79ed5ec Remove WindowsTorchApiMacro.h in favor of Export.h (#69585)
Summary:
Follow up to https://github.com/pytorch/pytorch/issues/68095

This also changes the files from the ATen folder to include c10's `Export.h` instead since they can't ever be exporting `TORCH_PYTHON_API`.

cc pietern mrshenli pritamdamania87 zhaojuanmao satgera rohan-varma gqchen aazzolini osalpekar jiayisuse SciPioneer H-Huang

Pull Request resolved: https://github.com/pytorch/pytorch/pull/69585

Reviewed By: mrshenli

Differential Revision: D32958594

Pulled By: albanD

fbshipit-source-id: 1ec7ef63764573fa2b486928955e3a1172150061
2021-12-09 17:30:09 -08:00

28 lines
655 B
C++

#pragma once
#include <ATen/core/qualified_name.h>
#include <torch/csrc/Export.h>
namespace torch {
namespace jit {
/**
* class NameMangler
*
* Utility to mangle qualified names in order to make them unique. We use this
* in various places where we to de-duplicate qualified names.
*/
class TORCH_API NameMangler {
public:
// Given a qualified name, return a mangled version that is guaranteed to be
// unique with respect to previous/future calls of `mangled()` on this name
// mangler instance.
c10::QualifiedName mangle(const c10::QualifiedName& name);
private:
size_t mangleIndex_ = 0;
};
} // namespace jit
} // namespace torch